From e3623da72cb87b0f3c11284af7a42d561a9014e3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 14 Dec 2012 10:00:05 +1000 Subject: 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 --- test/xserver-test.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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"); -- cgit v1.2.3