Page MenuHomePhabricator

tests don't run properly unless celery queue process already running
Closed, ResolvedPublic

Description

Author: sumanah

Description:
I have a fresh install of wikimetrics. If in one terminal I run

wikimetrics --mode queue

and then in another run

scripts/test

then the tests run - with some errors and failures, but they run, in about 100 seconds. If I DON'T explicitly get the queue going first, and just run the test script, then it runs through many of the tests but just gets stuck at

File "/home/sumanah/test/wikimetrics/tests/test_models/test_run_report.py", line 18, in test_empty_response
  result = jr.task.delay(jr).get()

Version: unspecified
Severity: normal
OS: Linux

Details

Reference
bz59846

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:31 AM
bzimport set Reference to bz59846.
bzimport added a subscriber: Unknown Object (MLST).

sumanah wrote:

(This is within a virtualenv, by the way, in case that makes a difference.)

With current master I see a slightly different error. Executing tests with nosetest they hang on the following line (and get stuck there a loooong time)

INFO in report [/workplace/wikimetrics/wikimetrics/models/report_nodes/report.py:47]:
running <Report("944")> on celery as None

Will take a look today

Change 108679 had a related patch set uploaded by Milimetric:
Fixes Bug 59846

https://gerrit.wikimedia.org/r/108679

sumanah wrote:

Now, even if I am not running the celery queue in another window, the tests run (with 2 errors and 1 failure). If I *am* running the celery queue in another window, then the tests also run, again, in about 100 seconds. So I think this is fixed! Thanks Dan.