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:
Eduardo Olivares 2023-06-06 17:52:38 +02:00
parent da0d344f5f
commit 654a7257bf
1 changed files with 4 additions and 2 deletions

View File

@ -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
# the alive_agents reference is the new list
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
LOG.warn("The list of agents has changed")
break
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:
LOG.info(f"the list of agents obtained for {consistent_count} "