Improve error message in fullstack test

_assert_ping_during_agents_restart is used in tests of L2 and L3
agents. However, when it raises an exception due to a timeout, the
associated message assumes the agent under test is L2. This patch
fixes that

Change-Id: I3568c97a621e97699fcd93f09897e132d4db402a
This commit is contained in:
Miguel Lavalle 2018-06-04 11:08:40 -05:00 committed by Slawek Kaplonski
parent d573e496de
commit 9237cf374e
1 changed files with 5 additions and 2 deletions

View File

@ -99,8 +99,11 @@ class BaseFullStackTestCase(testlib_api.MySQLTestCaseMixin,
# It is necessary to give agents time to initialize
# because some crucial steps (e.g. setting up bridge flows)
# happen only after RPC is established
agent_names = ', '.join({agent.process_fixture.process_name
for agent in agents})
common_utils.wait_until_true(
done,
timeout=count * (ping_timeout + 1),
exception=RuntimeError("Could not ping the other VM, L2 agent "
"restart leads to network disruption"))
exception=RuntimeError("Could not ping the other VM, "
"re-starting %s leads to network "
"disruption" % agent_names))