]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: shorten sleep time a bit
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 8 Jul 2022 21:22:39 +0000 (06:22 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 9 Jul 2022 02:44:25 +0000 (11:44 +0900)
Network interfaces will be ready after lease is acquired.
Hence, it is not necessary to wait more than lease time.

test/test-network/systemd-networkd-tests.py

index 37b0caa1532e1c046868a5a131cf03f086ab9a4b..f5ecfb019b3e9c8c5d408c44f6a27baab237711b 100755 (executable)
@@ -4610,8 +4610,8 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
                       lease_time='2m')
 
         # Sleep for 120 sec as the dnsmasq minimum lease time can only be set to 120
-        print('Wait for the dynamic address to be renewed')
-        time.sleep(125)
+        print('Wait for the DHCP lease to be expired')
+        time.sleep(120)
 
         self.wait_online(['veth99:routable', 'veth-peer:routable'])
 
@@ -4784,8 +4784,8 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         start_dnsmasq(ipv6_range='2600::30,2600::40', lease_time='2m')
 
         # Sleep for 120 sec as the dnsmasq minimum lease time can only be set to 120
-        print('Wait for the dynamic address to be renewed')
-        time.sleep(125)
+        print('Wait for the DHCP lease to be expired')
+        time.sleep(120)
 
         self.wait_online(['veth99:routable'])
 
@@ -4813,8 +4813,8 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         stop_dnsmasq()
 
         # Sleep for 120 sec as the dnsmasq minimum lease time can only be set to 120
-        print('Wait for the dynamic address to be expired')
-        time.sleep(125)
+        print('Wait for the DHCP lease to be expired')
+        time.sleep(120)
 
         print('The lease address should be kept after lease expired')
         output = check_output('ip address show dev veth99 scope global')
@@ -5010,8 +5010,8 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         output = check_output('ip -4 address show dev veth99 scope link')
         self.assertNotRegex(output, r'inet 169\.254\.\d+\.\d+/16 metric 2048 brd 169\.254\.255\.255 scope link')
 
-        print('Wait for the dynamic address to be expired')
-        time.sleep(130)
+        print('Wait for the DHCP lease to be expired')
+        time.sleep(120)
 
         output = check_output('ip address show dev veth99')
         print(output)
@@ -5607,15 +5607,8 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
 
         self.verify_dhcp4_6rd(tunnel_name)
 
-        # Test for renewing/rebinding lease
-        print('wait for 120 sec')
-        time.sleep(30)
-        print('wait for  90 sec')
-        time.sleep(30)
-        print('wait for  60 sec')
-        time.sleep(30)
-        print('wait for  30 sec')
-        time.sleep(30)
+        print('Wait for the DHCP lease to be expired')
+        time.sleep(120)
 
         dump_dnsmasq_log_file()