git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit05659962cd8c04a9e8bf05b298b735f5747bf12c authorxeji <36407913+xeji@users.noreply.github.com> dateThu 20 Sep 2018, 13:20 (8 years ago) parent8b58a71
1 file changed+3−1
nixos/tests/networking.nix+3−1
nixos/tests/networking.nix+3−1
@@ -467,7 +467,7 @@ let
467467
468468 # Wait for networking to come up
469469 $machine->start;
470− $machine->waitForUnit("network.target");
470+ $machine->waitForUnit("network-online.target");
471471
472472 # Test interfaces set up
473473 my $list = $machine->succeed("ip tuntap list | sort");
@@ -479,7 +479,9 @@ let
479479
480480 # Test interfaces clean up
481481 $machine->succeed("systemctl stop network-addresses-tap0");
482+ $machine->sleep(10);
482483 $machine->succeed("systemctl stop network-addresses-tun0");
484+ $machine->sleep(10);
483485 my $residue = $machine->succeed("ip tuntap list");
484486 $residue eq "" or die(
485487 "Some virtual interface has not been properly cleaned:\n",