summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorxeji <36407913+xeji@users.noreply.github.com>2018-09-20 13:20:12 +0200
committerGitHub <noreply@github.com>2018-09-20 13:20:12 +0200
commit05659962cd8c04a9e8bf05b298b735f5747bf12c (patch)
tree5d1cbd1c3a3e7194877840610213a21ac51dcf1a /nixos/tests
parent8b58a7187c9f3c8f1997f328c27c536effccdac3 (diff)
downloadnixlib-05659962cd8c04a9e8bf05b298b735f5747bf12c.tar
nixlib-05659962cd8c04a9e8bf05b298b735f5747bf12c.tar.gz
nixlib-05659962cd8c04a9e8bf05b298b735f5747bf12c.tar.bz2
nixlib-05659962cd8c04a9e8bf05b298b735f5747bf12c.tar.lz
nixlib-05659962cd8c04a9e8bf05b298b735f5747bf12c.tar.xz
nixlib-05659962cd8c04a9e8bf05b298b735f5747bf12c.tar.zst
nixlib-05659962cd8c04a9e8bf05b298b735f5747bf12c.zip
nixos/tests/networking.virtual: prevent non-deterministic failure (#46949)
The test failed non-deterministically on Hydra because interfaces
sometimes weren't yet fully cleaned up when the result was checked.
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/networking.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/tests/networking.nix b/nixos/tests/networking.nix
index 02bd4bd98079..87a8c4c0e196 100644
--- a/nixos/tests/networking.nix
+++ b/nixos/tests/networking.nix
@@ -467,7 +467,7 @@ let
 
         # Wait for networking to come up
         $machine->start;
-        $machine->waitForUnit("network.target");
+        $machine->waitForUnit("network-online.target");
 
         # Test interfaces set up
         my $list = $machine->succeed("ip tuntap list | sort");
@@ -479,7 +479,9 @@ let
 
         # Test interfaces clean up
         $machine->succeed("systemctl stop network-addresses-tap0");
+        $machine->sleep(10);
         $machine->succeed("systemctl stop network-addresses-tun0");
+        $machine->sleep(10);
         my $residue = $machine->succeed("ip tuntap list");
         $residue eq "" or die(
           "Some virtual interface has not been properly cleaned:\n",