Fix node data retrieval race in test_failed_provider
Once we start deleting nodes in test_failed_provider we can't count on getNode() giving us a node for a previous request because that node may have been deleted. Check that node is a valid value before accessing its provider value to avoid this race. Change-Id: Ie6b20f1a66de7865223a7ecf5785e2446afc7804
This commit is contained in:
parent
46706ae06b
commit
63dbab87df
@ -976,7 +976,7 @@ class TestLauncher(tests.DBTestCase):
|
||||
provider2_second = None
|
||||
nodes = map(pool.zk.getNode, pool.zk.getNodes())
|
||||
for node in nodes:
|
||||
if node.provider == 'fake-provider2':
|
||||
if node and node.provider == 'fake-provider2':
|
||||
provider2_second = node
|
||||
|
||||
# Now delete the new node we had provider2 build. At this point
|
||||
|
Loading…
Reference in New Issue
Block a user