summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-07-21 05:50:15 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-07-22 19:55:15 +0900
commitf91b2340770da0cbefefb865396897da99441eda (patch)
treeea50b33e5c2d93928c6b02de18faafcb221ae0a7 /test
parent1b1422212458d85af6358465637f1a09eb554914 (diff)
downloadsystemd-f91b2340770da0cbefefb865396897da99441eda.tar.gz
test-network: drop unnecessary sleep() in NetworkdStateFileTests.test_state_file
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index 677e39765e..efd3db8f44 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -2592,7 +2592,9 @@ class NetworkdStateFileTests(unittest.TestCase, Utilities):
path = os.path.join('/run/systemd/netif/links/', ifindex)
self.assertTrue(os.path.exists(path))
- time.sleep(2)
+
+ # make link state file updated
+ check_output(*resolvectl_cmd, 'revert', 'dummy98', env=env)
with open(path) as f:
data = f.read()
@@ -2616,7 +2618,6 @@ class NetworkdStateFileTests(unittest.TestCase, Utilities):
check_output(*resolvectl_cmd, 'mdns', 'dummy98', 'no', env=env)
check_output(*resolvectl_cmd, 'dnssec', 'dummy98', 'yes', env=env)
check_output(*timedatectl_cmd, 'ntp-servers', 'dummy98', '2.fedora.pool.ntp.org', '3.fedora.pool.ntp.org', env=env)
- time.sleep(2)
with open(path) as f:
data = f.read()
@@ -2629,7 +2630,6 @@ class NetworkdStateFileTests(unittest.TestCase, Utilities):
self.assertRegex(data, r'DNSSEC=yes')
check_output(*timedatectl_cmd, 'revert', 'dummy98', env=env)
- time.sleep(2)
with open(path) as f:
data = f.read()
@@ -2642,7 +2642,6 @@ class NetworkdStateFileTests(unittest.TestCase, Utilities):
self.assertRegex(data, r'DNSSEC=yes')
check_output(*resolvectl_cmd, 'revert', 'dummy98', env=env)
- time.sleep(2)
with open(path) as f:
data = f.read()