From 05659962cd8c04a9e8bf05b298b735f5747bf12c Mon Sep 17 00:00:00 2001 From: xeji <36407913+xeji@users.noreply.github.com> Date: Thu, 20 Sep 2018 13:20:12 +0200 Subject: [PATCH] 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. --- nixos/tests/networking.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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",