Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change SpawnIsSynchronous fixture return
In normal usage utils.spawn returns an eventlet.greenthread.GreenThread object which has a few methods defined on it. Currently the wait() and link() methods are used in Nova. However the SpawnIsSynchronous fixture was returning the results of wait() directly which led to an interface mismatch. Normally utils.spawn_n returns a greenlet object which does not allow checking the return but in testing we have never blocked that capability before. This could be enhanced later to be strict for spawn_n if we choose, but it is handy to have raised exceptions pass through in testing. SpawnIsSynchronous now returns a GreenThread object lookalike which has wait() and link() methods that work as expected. This allows for the removal of the wait() method from network/model.py:NetworkInfo. A few mocks which emulated the improper behavior were also updated. Change-Id: I1ded81f93235e217822e385ddd983b24c6359a53
- Loading branch information
Showing
4 changed files
with
73 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters