diff options
Diffstat (limited to 'indra/test/io.cpp')
-rw-r--r-- | indra/test/io.cpp | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/indra/test/io.cpp b/indra/test/io.cpp index c06c1b153b..c8e53e77a0 100644 --- a/indra/test/io.cpp +++ b/indra/test/io.cpp @@ -823,22 +823,19 @@ namespace tut class PumpAndChainTestData { protected: - apr_pool_t* mPool; LLPumpIO* mPump; LLPumpIO::chain_t mChain; public: PumpAndChainTestData() { - apr_pool_create(&mPool, NULL); - mPump = new LLPumpIO(mPool); + mPump = new LLPumpIO(); } ~PumpAndChainTestData() { mChain.clear(); delete mPump; - apr_pool_destroy(mPool); } }; typedef test_group<PumpAndChainTestData> PumpAndChainTestGroup; @@ -910,10 +907,8 @@ namespace tut pipe_and_pump_fitness() { LLFrameTimer::updateFrameTime(); - apr_pool_create(&mPool, NULL); - mPump = new LLPumpIO(mPool); + mPump = new LLPumpIO(); mSocket = LLSocket::create( - mPool, LLSocket::STREAM_TCP, SERVER_LISTEN_PORT); } @@ -922,7 +917,6 @@ namespace tut { mSocket.reset(); delete mPump; - apr_pool_destroy(mPool); } protected: @@ -948,7 +942,6 @@ namespace tut new LLPipeStringInjector("suckers never play me")); boost::shared_ptr<LLChainIOFactory> factory(emitter); LLIOServerSocket* server = new LLIOServerSocket( - mPool, mSocket, factory); server->setResponseTimeout(SHORT_CHAIN_EXPIRY_SECS); @@ -963,7 +956,7 @@ namespace tut // Set up the client //lldebugs << "fitness_test_object::test<1> - connecting client." // << llendl; - LLSocket::ptr_t client = LLSocket::create(mPool, LLSocket::STREAM_TCP); + LLSocket::ptr_t client = LLSocket::create(LLSocket::STREAM_TCP); LLHost server_host("127.0.0.1", SERVER_LISTEN_PORT); bool connected = client->blockingConnect(server_host); ensure("Connected to server", connected); @@ -995,7 +988,6 @@ namespace tut emitter_t* emitter = new emitter_t(new LLIOFuzz(1000000)); boost::shared_ptr<LLChainIOFactory> factory(emitter); LLIOServerSocket* server = new LLIOServerSocket( - mPool, mSocket, factory); server->setResponseTimeout(SHORT_CHAIN_EXPIRY_SECS); @@ -1006,7 +998,7 @@ namespace tut pump_loop(mPump, 0.1f); // Set up the client - LLSocket::ptr_t client = LLSocket::create(mPool, LLSocket::STREAM_TCP); + LLSocket::ptr_t client = LLSocket::create(LLSocket::STREAM_TCP); LLHost server_host("127.0.0.1", SERVER_LISTEN_PORT); bool connected = client->blockingConnect(server_host); ensure("Connected to server", connected); @@ -1038,7 +1030,6 @@ namespace tut emitter_t* emitter = new emitter_t(new LLIOFuzz(1000000)); boost::shared_ptr<LLChainIOFactory> factory(emitter); LLIOServerSocket* server = new LLIOServerSocket( - mPool, mSocket, factory); server->setResponseTimeout(SHORT_CHAIN_EXPIRY_SECS); @@ -1049,7 +1040,7 @@ namespace tut pump_loop(mPump, 0.1f); // Set up the client - LLSocket::ptr_t client = LLSocket::create(mPool, LLSocket::STREAM_TCP); + LLSocket::ptr_t client = LLSocket::create(LLSocket::STREAM_TCP); LLHost server_host("127.0.0.1", SERVER_LISTEN_PORT); bool connected = client->blockingConnect(server_host); ensure("Connected to server", connected); @@ -1081,7 +1072,6 @@ namespace tut emitter_t* emitter = new emitter_t(new LLIOFuzz(1000000)); boost::shared_ptr<LLChainIOFactory> factory(emitter); LLIOServerSocket* server = new LLIOServerSocket( - mPool, mSocket, factory); server->setResponseTimeout(SHORT_CHAIN_EXPIRY_SECS + 1.80f); @@ -1092,7 +1082,7 @@ namespace tut pump_loop(mPump, 0.1f); // Set up the client - LLSocket::ptr_t client = LLSocket::create(mPool, LLSocket::STREAM_TCP); + LLSocket::ptr_t client = LLSocket::create(LLSocket::STREAM_TCP); LLHost server_host("127.0.0.1", SERVER_LISTEN_PORT); bool connected = client->blockingConnect(server_host); ensure("Connected to server", connected); @@ -1122,7 +1112,6 @@ namespace tut sleeper_t* sleeper = new sleeper_t(new LLIOSleeper); boost::shared_ptr<LLChainIOFactory> factory(sleeper); LLIOServerSocket* server = new LLIOServerSocket( - mPool, mSocket, factory); server->setResponseTimeout(1.0); @@ -1135,7 +1124,7 @@ namespace tut lldebugs << "** Server is up." << llendl; // Set up the client - LLSocket::ptr_t client = LLSocket::create(mPool, LLSocket::STREAM_TCP); + LLSocket::ptr_t client = LLSocket::create(LLSocket::STREAM_TCP); LLHost server_host("127.0.0.1", SERVER_LISTEN_PORT); bool connected = client->blockingConnect(server_host); ensure("Connected to server", connected); @@ -1249,19 +1238,16 @@ namespace tut } }; - apr_pool_t* mPool; LLPumpIO* mPump; LLPumpIO::chain_t mChain; LLSimpleRPCClient* mClient; LLSD mResponse; rpc_server_data() : - mPool(NULL), mPump(NULL), mClient(NULL) { - apr_pool_create(&mPool, NULL); - mPump = new LLPumpIO(mPool); + mPump = new LLPumpIO(); mClient = new LLSimpleRPCClient(&mResponse); mChain.push_back(LLIOPipe::ptr_t(mClient)); mChain.push_back(LLIOPipe::ptr_t(new LLFilterSD2XMLRPCRequest)); @@ -1276,8 +1262,6 @@ namespace tut mChain.clear(); delete mPump; mPump = NULL; - apr_pool_destroy(mPool); - mPool = NULL; } void pump_loop(const LLSD& request) { |