Comment 2 for bug 1497269

Revision history for this message
Nikolay Makhotkin (nmakhotkin) wrote :

Not only the one test fails. test_scheduler_with_factory, test_scheduler_without_factory also fail once in a while. But these tests don't assume we have multi instance scheduler. Here is a concurrency problem.

======================================================================
FAIL: mistral.tests.unit.services.test_scheduler.SchedulerServiceTest.test_scheduler_without_factory
tags: worker-2
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "/home/kolyan/projects/mistral/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "mistral/tests/unit/services/test_scheduler.py", line 119, in test_scheduler_without_factory
    method.assert_called_once_with(name='task', id='321')
  File "/home/kolyan/projects/mistral/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 947, in assert_called_once_with
    raise AssertionError(msg)
AssertionError: Expected 'factory_method' to be called once. Called 2 times.