From bfdda3212ac9221e8e5c1deea222f5ba0db7e35f Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 12 Sep 2013 10:51:07 -0700 Subject: [PATCH] Make ChildProcess UnitTest manual since it malfunctions --- .../beast_core/threads/beast_ChildProcess.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/beast_core/threads/beast_ChildProcess.cpp b/modules/beast_core/threads/beast_ChildProcess.cpp index 24618f1e05..3aafba1b66 100644 --- a/modules/beast_core/threads/beast_ChildProcess.cpp +++ b/modules/beast_core/threads/beast_ChildProcess.cpp @@ -61,8 +61,6 @@ String ChildProcess::readAllProcessOutput() class ChildProcessTests : public UnitTest { public: - ChildProcessTests() : UnitTest ("ChildProcess", "beast") {} - void runTest() { beginTestCase ("Child Processes"); @@ -76,10 +74,25 @@ public: expect (p.start ("ls /")); #endif + if (! p.waitForProcessToFinish (10 * 1000)) + { + if (p.kill ()) + p.waitForProcessToFinish (-1); + } + //String output (p.readAllProcessOutput()); //expect (output.isNotEmpty()); #endif } + + // VFALCO NOTE I had to disable this test because it was leaving + // behind a zombie process and making other unit tests fail. + // It doesnt happen with a debugger attached, or if the + // unit test is run individually. + // + ChildProcessTests() : UnitTest ("ChildProcess", "beast", runManual) + { + } }; static ChildProcessTests childProcessTests;