summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-12-14 10:00:05 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-12-14 10:07:50 +1000
commite3623da72cb87b0f3c11284af7a42d561a9014e3 (patch)
treeb4a161a3d3bf1bab9fa14c0e2aec002752fc056b
parentb5843afd7250446d5e3ebaee2055b7f1b281df2e (diff)
test: wait a bit for the server to finish
Every so-often, the server doesn't terminate fast enough and we fail the test. Put a wait loop in. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--test/xserver-test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/xserver-test.cpp b/test/xserver-test.cpp
index 7f949ef..822bb23 100644
--- a/test/xserver-test.cpp
+++ b/test/xserver-test.cpp
@@ -358,10 +358,15 @@ TEST(XServer, KeepAlive)
TEST(XServer, RemoveOption)
{
+ int i = 0;
XServer server;
server.SetOption("-fail", "yes");
server.SetOption("-logfile", LOGFILE_DIR "/Xorg-remove-option.log");
server.Start(TEST_ROOT_DIR "/xserver-test-helper");
+
+ while(i++ < 10 && server.GetState() == Process::RUNNING)
+ usleep(50000);
+
ASSERT_EQ(server.GetState(), Process::FINISHED_FAILURE);
server.RemoveOption("-fail");