Skip to content

Commit

Permalink
Revert ProcessTest.cpp because the test there is pointless
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Oct 3, 2024
1 parent fd21774 commit b896392
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions test/cxx/Core/ApplicationPool/ProcessTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace tut {
SpawningKit::Context skContext;
Context context;
BasicGroupInfo groupInfo;
unsigned int generation;
vector<SpawningKit::Result::Socket> sockets;
Pipe stdinFd, stdoutAndErrFd;
FileDescriptor server1, server2, server3;
Expand All @@ -35,8 +34,6 @@ namespace tut {
groupInfo.group = NULL;
groupInfo.name = "test";

generation = 0;

struct sockaddr_in addr;
socklen_t len = sizeof(addr);
SpawningKit::Result::Socket socket;
Expand Down Expand Up @@ -121,10 +118,8 @@ namespace tut {

args["spawner_creation_time"] = 0;

Process *p = context.processObjectPool.malloc();
p = new (p) Process(&groupInfo, generation, result, args);
ProcessPtr process(p, false);

ProcessPtr process(context.processObjectPool.construct(
&groupInfo, result, args), false);
process->shutdownNotRequired();
return process;
}
Expand Down Expand Up @@ -243,15 +238,4 @@ namespace tut {
&& contents.find("stdout and err 4\n") != string::npos;
);
}

TEST_METHOD(6) {
set_test_name("Test generation is inherited from pool at construction time");
// this test is pointless b/c the process is made at line 123 of this file, not in the regular codebase
ProcessPtr process1 = createProcess();
ensure_equals(process1->generation, generation);
generation++;
ProcessPtr process2 = createProcess();
ensure_equals(process2->generation, generation);
ensure(process1->generation != process2->generation);
}
}

0 comments on commit b896392

Please sign in to comment.