Merge lp:~soren/nova/fix-unittest into lp:~hudson-openstack/nova/trunk
Proposed by
Soren Hansen
Status: | Merged |
---|---|
Approved by: | Jay Pipes |
Approved revision: | 673 |
Merged at revision: | 673 |
Proposed branch: | lp:~soren/nova/fix-unittest |
Merge into: | lp:~hudson-openstack/nova/trunk |
Diff against target: |
52 lines (+15/-20) 1 file modified
nova/tests/test_api.py (+15/-20) |
To merge this branch: | bzr merge lp:~soren/nova/fix-unittest |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jay Pipes (community) | Approve | ||
Ed Leafe (community) | Approve | ||
Thierry Carrez (community) | Approve | ||
Review via email: mp+49788@code.launchpad.net |
Commit message
Fix sporadically failing unittests.
Description of the change
It turns out the failing unittests from the last couple of days weren't racy. They were caused by a difference in ordering depending on the randomly chosen name for the security group used in the tests.
This patch makes sure that we're working on the right groups in the latter half these unit tests.
To post a comment you must log in.
This might be cleaner:
group = [grp for grp in rv if grp.name == security_ group_name] [0]
It eliminates the iteration loop, and would have avoided the problem in the first place.