Improve logs for test_alive_agents_are_consistent_along_time
When this test fails or when retries are needed, it is not clear why it failed. The logs say "The list of agents has changed". It should be clear how that list changed. Change-Id: I0e6a070dcf5808b0ab4379cb41e74e5ff352856a
This commit is contained in:
parent
da0d344f5f
commit
654a7257bf
@ -135,12 +135,14 @@ def test_alive_agents_are_consistent_along_time(retry_timeout=180.,
|
|||||||
# go to the outer loop if the set of agents changed
|
# go to the outer loop if the set of agents changed
|
||||||
# the alive_agents reference is the new list
|
# the alive_agents reference is the new list
|
||||||
if set(actual) != set(alive_agents):
|
if set(actual) != set(alive_agents):
|
||||||
|
LOG.warn("The list of agents has changed\n"
|
||||||
|
f"previous_agent_list:\n{alive_agents}\n"
|
||||||
|
f"new_agent_list:\n{actual}")
|
||||||
alive_agents = actual
|
alive_agents = actual
|
||||||
LOG.warn("The list of agents has changed")
|
|
||||||
break
|
break
|
||||||
|
|
||||||
LOG.debug("The new list of agents matched the previous list "
|
LOG.debug("The new list of agents matched the previous list "
|
||||||
"%d times", attempt_in.number + 1)
|
"%d times", attempt_in.number)
|
||||||
|
|
||||||
if attempt_in.is_last:
|
if attempt_in.is_last:
|
||||||
LOG.info(f"the list of agents obtained for {consistent_count} "
|
LOG.info(f"the list of agents obtained for {consistent_count} "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user