Race condition causes unit test to occasionally fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
USC-ISI |
Bug Description
Occasionally, I get the following unit test failure:
=======
FAIL: test_run_instances (nova.tests.
-------
Traceback (most recent call last):
File "/Users/
self.
AssertionError: u'scheduling' != 'networking'
-------
The issue seems to be that the test assumes that the rpc.cast in nova.compute.
The test code (test_cloud.py) already has the following code to reduce the probability of this happening:
rpc_cast = rpc.cast
def finish_cast(*args, **kwargs):
---
If you comment out the sleep statement, the bug can be reliably reproduced.
Related branches
- Mark Washenberger (community): Approve
- Brian Waldon (community): Approve
- Trey Morris (community): Needs Fixing
-
Diff: 25 lines (+7/-1)1 file modifiednova/tests/test_cloud.py (+7/-1)
Changed in nova: | |
assignee: | nobody → USC-ISI (usc-isi) |
importance: | Undecided → Low |
status: | New → In Progress |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → diablo-2 |
Changed in nova: | |
milestone: | diablo-2 → 2011.3 |
status: | Fix Committed → Fix Released |