From 4db2d4d1fda550d480faa72e32b0e4e07c7862b5 Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Sun, 20 May 2018 20:59:53 +0200
Subject: [PATCH] nixos/xsslock: wait until `pgrep xlock` succeeds (#40810)

Please refer to the conversation in the original PR (#40619) for further
reference: https://github.com/NixOS/nixpkgs/pull/40619#issuecomment-390437845

It takes some time after the standby to trigger the locker which might
break the test on Hydra.
---
 nixos/tests/xss-lock.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nixos/tests/xss-lock.nix b/nixos/tests/xss-lock.nix
index 3e3864cab770..045667bdcdec 100644
--- a/nixos/tests/xss-lock.nix
+++ b/nixos/tests/xss-lock.nix
@@ -20,6 +20,6 @@ with lib;
 
     $machine->fail("pgrep xlock");
     $machine->succeed("su -l alice -c 'xset dpms force standby'");
-    $machine->succeed("pgrep xlock");
+    $machine->waitUntilSucceeds("pgrep xlock");
   '';
 })