test/cxx/ApplicationPool2/ProcessTest.cpp in passenger-3.9.2.beta vs test/cxx/ApplicationPool2/ProcessTest.cpp in passenger-4.0.0.rc4

- old
+ new

@@ -49,19 +49,23 @@ TEST_METHOD(1) { // Test initial state. ProcessPtr process = make_shared<Process>(bg.safe, 123, "", "", adminSocket[0], errorPipe[0], sockets, 0, 0); + process->dummy = true; + process->requiresShutdown = false; ensure_equals(process->utilization(), 0); ensure(!process->atFullCapacity()); } TEST_METHOD(2) { // Test opening and closing sessions. ProcessPtr process = make_shared<Process>(bg.safe, 123, "", "", adminSocket[0], errorPipe[0], sockets, 0, 0); + process->dummy = true; + process->requiresShutdown = false; SessionPtr session = process->newSession(); SessionPtr session2 = process->newSession(); ensure_equals(process->sessions, 2); process->sessionClosed(session.get()); ensure_equals(process->sessions, 1); @@ -73,10 +77,12 @@ // newSession() checks out the socket with the smallest utilization number // and sessionClosed() restores the session utilization statistics. ProcessPtr process = make_shared<Process>(bg.safe, 123, "", "", adminSocket[0], errorPipe[0], sockets, 0, 0); + process->dummy = true; + process->requiresShutdown = false; // The first 3 newSession() commands check out an idle socket. SessionPtr session1 = process->newSession(); SessionPtr session2 = process->newSession(); SessionPtr session3 = process->newSession(); @@ -116,9 +122,11 @@ TEST_METHOD(4) { // If all sockets are at their full capacity then newSession() will fail. ProcessPtr process = make_shared<Process>(bg.safe, 123, "", "", adminSocket[0], errorPipe[0], sockets, 0, 0); + process->dummy = true; + process->requiresShutdown = false; vector<SessionPtr> sessions; for (int i = 0; i < 9; i++) { ensure(!process->atFullCapacity()); SessionPtr session = process->newSession(); ensure(session != NULL);