git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/tests/i3wm: prevent non-deterministic failure (#45759)

Test failed sporadically on Hydra, probably due to timing issues. These changes should make that less likely to occur.

commit70b3ac8378382ec401d3f2d757f0102bd8c50825 authorxeji <36407913+xeji@users.noreply.github.com> dateWed 29 Aug 2018, 19:38 (8 years ago) parentff6a61a
1 file changed+6−4
nixos/tests/i3wm.nix+6−4
nixos/tests/i3wm.nix+6−4
@@ -16,18 +16,20 @@ import ./make-test.nix ({ pkgs, ...} : {
1616 $machine->waitForFile("/home/alice/.Xauthority");
1717 $machine->succeed("xauth merge ~alice/.Xauthority");
1818 $machine->waitForWindow(qr/first configuration/);
19− $machine->sleep(1);
19+ $machine->sleep(2);
2020 $machine->screenshot("started");
2121 $machine->sendKeys("ret");
22− $machine->sleep(1);
22+ $machine->sleep(2);
2323 $machine->sendKeys("alt");
24− $machine->sleep(1);
24+ $machine->sleep(2);
2525 $machine->screenshot("configured");
2626 $machine->sendKeys("ret");
27+ # make sure the config file is created before we continue
28+ $machine->waitForFile("/home/alice/.config/i3/config");
2729 $machine->sleep(2);
2830 $machine->sendKeys("alt-ret");
2931 $machine->waitForWindow(qr/machine.*alice/);
30− $machine->sleep(1);
32+ $machine->sleep(2);
3133 $machine->screenshot("terminal");
3234 '';
3335})