StorwizeSVCDriverTestCase.test_storwize_vdisk_copy_ops fails if there is a context switch to another green thread
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
TaoBai |
Bug Description
StorwizeSVCDriv
This is achieved by monkey patching greenthread.sleep() function in setUp():
self.
self.
This seems to be a workaround in order to make the test pass, while it's hiding the actual reason of the problem. Any code causing the thread context switch in some other way will break the test (e.g. syncing the latest oslo.db code from oslo.incubator breaks this test, because it uses time.sleep() instead of eventlet.
Monkey patching of greenthread.sleep() in order to prevent thread context switches doesn't seem to be a good solution anyway as it is an assumption which is not true when Cinder is run in production.
description: | updated |
tags: | added: drivers storwize |
Changed in cinder: | |
assignee: | nobody → Tao Bai (baitao2020) |
summary: |
- StorwizeSVCDriverTestCase.test_storwize_vdisk_copy_ops depends fails if - there is a context switch to another green thread + StorwizeSVCDriverTestCase.test_storwize_vdisk_copy_ops fails if there is + a context switch to another green thread |
Changed in cinder: | |
milestone: | none → juno-2 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | juno-2 → 2014.2 |
Agreed that this looks like dodgy code and should be fixed up.