From a45c981a935e1d70e83a413f20d3b76af2b774ae Mon Sep 17 00:00:00 2001 From: Camden Narzt Date: Mon, 14 Oct 2024 13:16:55 -0600 Subject: [PATCH] =?UTF-8?q?change=20test=20condition=20per=20hongli?= =?UTF-8?q?=E2=80=99s=20request?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/cxx/Core/ApplicationPool/PoolTest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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,