test_engine_service tests are racy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Medium
|
Steven Hardy |
Bug Description
Several of these tests rely on running code via eventlet threads scheduled
via the engine service ThreadGroupManager.
In some of these cases, we then go on to make assertions based on assumptions that the threads have completed
(some of them are actually wrong assertions which test the thread is *not* completed!).
Even in the cases where wait() is called, we're introducing undue complexity, given that we just want to run the function (or test that it will be run) in the "unit" tests.
Examples:
https:/
https:/
Similar issues throughout the file due to cut/paste badness.
Changed in heat: | |
assignee: | nobody → Steven Hardy (shardy) |
importance: | Undecided → High |
status: | New → In Progress |
importance: | High → Medium |
Changed in heat: | |
milestone: | none → liberty-3 |
Changed in heat: | |
milestone: | liberty-3 → liberty-rc1 |
Changed in heat: | |
status: | In Progress → Fix Released |
Actually same pattern in a few other places as well:
$ grep -R "create_ periodic_ tasks" ./* | grep -v pyc | grep -v bak test_stack_ create. py: self.man. create_ periodic_ tasks() test_stack_ snapshot. py: self.engine. create_ periodic_ tasks() test_stack_ events. py: self.eng. create_ periodic_ tasks() test_stack_ delete. py: self.man. create_ periodic_ tasks() test_stack_ action. py: self.man. create_ periodic_ tasks() engine_ service. py: self.eng. create_ periodic_ tasks() metadata_ refresh. py: self.man. create_ periodic_ tasks()
./engine/
./engine/
./engine/
./engine/
./engine/
./test_
./test_