Increase timeouts in TestComponentRegistry (#2)
The test_executor_component test has been flaky recently. The cause is not clear, but one potential cause is a test node that is slow enough that we hit our 10 second timeouts waiting for zk events or thread scheduling. To attempt to improve the test, increase the timeouts we use for state changes. 25 seconds is used to avoid interation with the 30 second zk connection timeout. This is similar to change I263f853f57f64252f651c898897536afdb034063 which made this change to similar tests in the test_zk file. Change-Id: I38334943ddb311ea3600573ab8ebd75bcb6279c0
This commit is contained in:
parent
d91efe232d
commit
56731826ab
|
@ -28,7 +28,7 @@ class TestComponentRegistry(ZuulTestCase):
|
|||
self.component_registry = ComponentRegistry(self.zk_client)
|
||||
|
||||
def assertComponentAttr(self, component_name, attr_name,
|
||||
attr_value, timeout=10):
|
||||
attr_value, timeout=25):
|
||||
for _ in iterate_timeout(
|
||||
timeout,
|
||||
f"{component_name} in cache has {attr_name} set to {attr_value}",
|
||||
|
@ -40,12 +40,12 @@ class TestComponentRegistry(ZuulTestCase):
|
|||
):
|
||||
break
|
||||
|
||||
def assertComponentState(self, component_name, state, timeout=10):
|
||||
def assertComponentState(self, component_name, state, timeout=25):
|
||||
return self.assertComponentAttr(
|
||||
component_name, "state", state, timeout
|
||||
)
|
||||
|
||||
def assertComponentStopped(self, component_name, timeout=10):
|
||||
def assertComponentStopped(self, component_name, timeout=25):
|
||||
for _ in iterate_timeout(
|
||||
timeout, f"{component_name} in cache is stopped"
|
||||
):
|
||||
|
|
Loading…
Reference in New Issue