Intermittent failure of test_sync_bay_status_not_changes_StringException

Bug #1476207 reported by Tom Cammann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Unassigned

Bug Description

Intermittently recurring bug in python 2.7 tests.

http://logs.openstack.org/66/203466/2/check/gate-magnum-python27/e74f8d0/testr_results.html.gz

ft1.798: magnum.tests.unit.service.test_periodic.PeriodictTestCase.test_sync_bay_status_not_changes_StringException: Empty attachments:
  stderr
  stdout

Traceback (most recent call last):1
  File "/home/jenkins/workspace/gate-magnum-python27/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "magnum/tests/unit/service/test_periodic.py", line 103, in test_sync_bay_status_not_changes
    self.assertEqual(bay3.status, bay_status.UPDATE_IN_PROGRESS)
  File "/home/jenkins/workspace/gate-magnum-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/jenkins/workspace/gate-magnum-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: u'UPDATE_FAILED' != 'UPDATE_IN_PROGRESS'

Appears to be because test ordering implications and setup up of test being out of the setUp block.

Revision history for this message
Tom Cammann (tom-cammann) wrote :

Cam be replicated running 'python setup.py testr --testr-args "--parallel --concurrency=1"'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/203608
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=ad98fc1855df4eae773794f1d3b0ab12afc25a81
Submitter: Jenkins
Branch: master

commit ad98fc1855df4eae773794f1d3b0ab12afc25a81
Author: Tom Cammann <email address hidden>
Date: Mon Jul 20 12:58:46 2015 +0100

    Fix setup of tests to remove intermittent failure

    The tests in test_periodic can fail if the tests are run in the same
    process/thread. The stub bays used in the test were not reset between
    tests, leading to intermittent failures in CI. Move the setup of the
    stub bays inside the setUp function to assure the stubs are setup
    between test functions.

    Change-Id: Idb705bc9e5ecb5c798b09367bd546655f874c04e
    Closes-Bug: 1476207

Changed in magnum:
status: New → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
status: Fix Committed → Fix Released
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.