ProcessCronTriggerTest fails sometimes

Bug #1564353 reported by Renat Akhmerov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Medium
Renat Akhmerov

Bug Description

Here's the log from the gate:

ft41.3: mistral.tests.unit.engine.test_cron_trigger.ProcessCronTriggerTest.test_start_workflow_StringException: Empty attachments:
  stderr

pythonlogging:'': {{{WARNING [oslo_db.sqlalchemy.utils] Id not in sort_keys; is sort_keys unique?}}}
stdout: {{{
Engine test case exception occurred: list index out of range
Exception type: <type 'exceptions.IndexError'>

Printing workflow executions...

my_wf [state=RUNNING, output={}]
 task1 [id=81714ebf-ad11-4439-a44c-53ea9437b7ec, state=RUNNING, published={}]
}}}

Traceback (most recent call last):
  File "/home/jenkins/workspace/gate-mistral-python27/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "mistral/tests/unit/engine/test_cron_trigger.py", line 69, in test_start_workflow
    next_trigger = triggers.get_next_cron_triggers()[0]
IndexError: list index out of range

Changed in mistral:
importance: Undecided → Medium
milestone: none → newton-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/303309
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=597665579d5aafe467f66b505251732c682ad1b4
Submitter: Jenkins
Branch: master

commit 597665579d5aafe467f66b505251732c682ad1b4
Author: Renat Akhmerov <email address hidden>
Date: Fri Apr 8 16:01:29 2016 +0700

    Switch to auto-generated cron trigger names in unit tests

    * Before this change there was a possibility of conflicts between
      different tests working with cron triggers, especially if run
      in parallel, because of using same trigger names (e.g. 'test').
      To prevent such potential situations all trigger names should
      be unique and generated randomly.

    Change-Id: I57b0ac8072ab5f9158547fa0611a1003d1dc5e8a
    Partial-Bug: #1564353

Revision history for this message
Renat Akhmerov (rakhmerov) wrote :

It hasn't been observed (unlike other similar issues) since this last patch was merged. Closing it for now and we'll reopen it if it repeats.

Changed in mistral:
status: New → Fix Committed
assignee: nobody → Renat Akhmerov (rakhmerov)
Revision history for this message
Renat Akhmerov (rakhmerov) wrote :

Nope, it still fails.

ft41.2: mistral.tests.unit.engine.test_cron_trigger.ProcessCronTriggerTest.test_workflow_without_auth_StringException: Empty attachments:
  stderr

pythonlogging:'': {{{WARNING [oslo_db.sqlalchemy.utils] Id not in sort_keys; is sort_keys unique?}}}
stdout: {{{
Engine test case exception occurred: 1 != 0
Exception type: <class 'testtools.matchers._impl.MismatchError'>

Printing workflow executions...

my_wf [state=RUNNING, output={}]
 task1 [id=ccfb204d-23d6-4c52-89e3-e72d0ed3c745, state=RUNNING, published={}]

my_wf [state=RUNNING, output={}]
 task1 [id=eee1d972-7cee-4277-8531-37c72db2bc94, state=RUNNING, published={}]
}}}

Traceback (most recent call last):
  File "/home/jenkins/workspace/gate-mistral-python34/mistral/tests/unit/engine/test_cron_trigger.py", line 111, in test_workflow_without_auth
    self.assertEqual(1, len(next_triggers))
  File "/home/jenkins/workspace/gate-mistral-python34/.tox/py34/lib/python3.4/site-packages/testtools/testcase.py", line 362, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/jenkins/workspace/gate-mistral-python34/.tox/py34/lib/python3.4/site-packages/testtools/testcase.py", line 447, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 1 != 0

Changed in mistral:
status: Fix Committed → Confirmed
Revision history for this message
Renat Akhmerov (rakhmerov) wrote :

But now it is a different test though.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/306292
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=1586c3e1d9cb6bee4df34b2b0014550e2658e027
Submitter: Jenkins
Branch: master

commit 1586c3e1d9cb6bee4df34b2b0014550e2658e027
Author: Renat Akhmerov <email address hidden>
Date: Fri Apr 15 15:26:34 2016 +0700

    Disable cron trigger thread for API unit tests

    * API unit tests activated cron trigger thread whereas all unit tests
      assume that it's not started. Tests where it needs to be activated
      should do it explicitly and shut down it after completion.
      This was causing unpredictable results where we were assuming that
      there weren't any active cron trigger threads.
    * Minor cosmetic changes

    Change-Id: I7e30f80b29520e03f2e1673788c764aabe1e4a8b
    Closes-Bug: #1564353

Changed in mistral:
status: Confirmed → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/mistral 3.0.0.0b1

This issue was fixed in the openstack/mistral 3.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.