]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: sleep 1s after reloading configs
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 3 Dec 2020 05:16:41 +0000 (14:16 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 4 Dec 2020 02:28:52 +0000 (11:28 +0900)
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

index 3c288fc6eebe3a0e471c382329682a47cea65864..f759840d2381ce48cea43c28ea9c5ca2db8cf397 100755 (executable)
@@ -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