diff --git a/test/cxx/Core/ApplicationPool/PoolTest.cpp b/test/cxx/Core/ApplicationPool/PoolTest.cpp index 9a86b3ff86..bdda8bc6b6 100644 --- a/test/cxx/Core/ApplicationPool/PoolTest.cpp +++ b/test/cxx/Core/ApplicationPool/PoolTest.cpp @@ -644,12 +644,15 @@ namespace tut { // Close the session so that the process is now idle. ProcessPtr process = currentSession->getProcess()->shared_from_this(); + pid_t pid = process->getPid(); currentSession.reset(); unsigned int gen1 = process->generation; ensure(pool->restartGroupByName(options.appRoot)); EVENTUALLY(5, - result = pool->getProcessCount() == 1; + LockGuard l(pool->syncher); + vector processes = pool->getProcesses(false); + processes.size() > 0 && processes[0]->getPid() != pid; ); pool->asyncGet(options, callback); EVENTUALLY(5,