Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test test_40_task_resource_status fails when tests run with sqlite #579

Closed
seanh opened this issue Mar 6, 2013 · 10 comments
Closed

Test test_40_task_resource_status fails when tests run with sqlite #579

seanh opened this issue Mar 6, 2013 · 10 comments

Comments

@seanh
Copy link
Contributor

seanh commented Mar 6, 2013

======================================================================
ERROR: ckan.tests.logic.test_action.TestAction.test_40_task_resource_status
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/seanh/.virtualenvs/ckan/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/seanh/Projects/ckan/ckan/ckan/tests/logic/test_action.py", line 976, in test_40_task_resource_status
    INSERT INTO celery_taskmeta (id, task_id, status, result, date_done, traceback) VALUES (2, '51f2105d-85b1-4393-b821-ac11475919d9', 'FAILURE', '52e', '2012-04-20 21:33
:01.622557', 'Traceback')'''
  File "/home/seanh/.virtualenvs/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1449, in execute
    params)
  File "/home/seanh/.virtualenvs/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1628, in _execute_text
    statement, parameters
  File "/home/seanh/.virtualenvs/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
    context)
  File "/home/seanh/.virtualenvs/ckan/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 331, in do_execute
    cursor.execute(statement, parameters)
Warning: You can only execute one statement at a time.

Wider discussion: Travis does not run the sqlite tests. Maybe he should. Or maybe we should just get rid of the sqlite tests.

@seanh
Copy link
Contributor Author

seanh commented Mar 6, 2013

This looks like an easy fix, but I'm gonna wait for Vitor to push a branch that changes Travis to also run the sqlite tests first, then I'll try pushing a fix for this onto that same branch. Vitor is waitin for another pull request with Travis changes in it to be merged before he does it..

@vitorbaptista
Copy link
Contributor

This is getting messy :P

Just for the record, the pr @seanh is talking about is #562

@tobes
Copy link
Contributor

tobes commented Mar 14, 2013

What is the status of this #562 has been merged. I think it is good to keep the sqlite tests while we support it

@seanh
Copy link
Contributor Author

seanh commented Mar 15, 2013

@tobes @vitor No I wasn't talking about #562 (which is about running the tests with postgres 8.4 and 9.1), I was talking about a Travis change to run the tests with sqlite. In my opinion there's no point in fixing this test fail (which only occurs if you run the tests with sqlite) because Travis does not run the sqlite tests and neither do any of the devs. Possible solutions:

  1. Get rid of the sqlite tests
  2. Make Travis run the sqlite tests as well as the postgres ones, which will break the build as this sqlite test currently fails, then try to fix this test (possibly on the same branch if we don't want to break master)

We're having a combinatorial explosion in the number of times Travis has to run the tests for each commit: Postgrss 8.4 and 9.1, sqlite, Python 2.6 and 2.7 ... If we get Travis running the sqlite tests he'll be running the tests 6 times per commit. So perhaps we should consider killing the sqlite tests.

@tobes
Copy link
Contributor

tobes commented Mar 15, 2013

I'd be happy to reduce the number of travis tests to

python 2.6 and postgres 8.4
python 2.7 and postgres 9.1
python 2.6 and sqlite

sqlite and 2.7 would not be supported by this but I'm not that worried about that we could include it if needed. I don't think we need to check all the python/postgres combos directly

extra tests don't hurt us as they run in parallel but seem pointless.

Why exactly do we support sqlite? But for now I'd like to see it tested since we have it and lets try to keep master fail free so get working in a branch first.

@seanh
Copy link
Contributor Author

seanh commented Mar 15, 2013

That looks fine to me.

I think the only reason we support sqlite is because the tests run faster with sqlite.

@tobes
Copy link
Contributor

tobes commented Mar 15, 2013

imho that sounds like the sqlite tests should be removed - I don't think anyone is using them and when we merge my tests in separate db #517 (which I need to fix up) then that usecase goes too.

@seanh
Copy link
Contributor Author

seanh commented Mar 15, 2013

I'm not sure the 4 test jobs we currently have do run in parallel, it seems to start the first job and then about 15 minutes later the second job starts (even if the first is still running) and so on, so adding more jobs will make it take much longer per commit

@amercader
Copy link
Member

Just my 2 cts, I personally use the sqlite tests when developing to do quick tests but I don't think we need them to run on Travis as I agree more jobs will slow the tests even more the test runs.

@kindly
Copy link
Contributor

kindly commented Sep 2, 2013

Not supporting sqlite tests anymore.

@kindly kindly closed this as completed Sep 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants