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.
This commit is contained in:
xeji 2018-09-20 13:20:12 +02:00 committed by GitHub
parent 8b58a7187c
commit 05659962cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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",