From 37b9c79e5d234ba5c0ce98a2a8cc8d18dd9bd572 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 3 Dec 2020 14:16:41 +0900 Subject: [PATCH] test-network: sleep 1s after reloading configs As interfaces will be reconfigured asynchronously after `networkctl reload`. So, right after `networkctl reload` is finished, interfaces may be still in 'configured' state with the old .network files. --- test/test-network/systemd-networkd-tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 3c288fc6ee..f759840d23 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -2242,6 +2242,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities): copy_unit_to_networkd_unit_path('25-address-static.network') check_output(*networkctl_cmd, 'reload', env=env) + time.sleep(1) self.wait_online(['dummy98:routable']) # check all routes managed by Manager are removed @@ -2262,6 +2263,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities): remove_unit_from_networkd_path(['25-address-static.network']) check_output(*networkctl_cmd, 'reload', env=env) + time.sleep(1) self.wait_online(['dummy98:routable']) # check all routes managed by Manager are reconfigured