summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/test/io.cpp10
-rw-r--r--indra/test/llhttpclient_tut.cpp5
-rw-r--r--indra/test/lliohttpserver_tut.cpp8
3 files changed, 16 insertions, 7 deletions
diff --git a/indra/test/io.cpp b/indra/test/io.cpp
index 38f86b9e57..ce747f667d 100644
--- a/indra/test/io.cpp
+++ b/indra/test/io.cpp
@@ -838,6 +838,7 @@ namespace tut
{
mChain.clear();
delete mPump;
+ apr_pool_destroy(mPool);
}
};
typedef test_group<PumpAndChainTestData> PumpAndChainTestGroup;
@@ -908,9 +909,8 @@ namespace tut
pipe_and_pump_fitness()
{
- apr_pool_create(&mPool, NULL);
-
LLFrameTimer::updateFrameTime();
+ apr_pool_create(&mPool, NULL);
mPump = new LLPumpIO(mPool);
mSocket = LLSocket::create(
mPool,
@@ -922,6 +922,7 @@ namespace tut
{
mSocket.reset();
delete mPump;
+ apr_pool_destroy(mPool);
}
protected:
@@ -1248,13 +1249,14 @@ namespace tut
}
};
+ apr_pool_t* mPool;
LLPumpIO* mPump;
LLPumpIO::chain_t mChain;
LLSimpleRPCClient* mClient;
LLSD mResponse;
- apr_pool_t* mPool;
rpc_server_data() :
+ mPool(NULL),
mPump(NULL),
mClient(NULL)
{
@@ -1274,6 +1276,8 @@ namespace tut
mChain.clear();
delete mPump;
mPump = NULL;
+ apr_pool_destroy(mPool);
+ mPool = NULL;
}
void pump_loop(const LLSD& request)
{
diff --git a/indra/test/llhttpclient_tut.cpp b/indra/test/llhttpclient_tut.cpp
index 16a73c03cb..4b4046632c 100644
--- a/indra/test/llhttpclient_tut.cpp
+++ b/indra/test/llhttpclient_tut.cpp
@@ -36,11 +36,11 @@
// These are too slow on Windows to actually include in the build. JC
#if !LL_WINDOWS
-#include "llapr.h"
#include "lltut.h"
#include "llhttpclient.h"
#include "llformat.h"
#include "llpipeutil.h"
+#include "llproxy.h"
#include "llpumpio.h"
#include "llsdhttpserver.h"
@@ -89,6 +89,7 @@ namespace tut
LLCurl::initClass(false);
mServerPump = new LLPumpIO(mPool);
mClientPump = new LLPumpIO(mPool);
+
LLHTTPClient::setPump(*mClientPump);
}
@@ -96,6 +97,8 @@ namespace tut
{
delete mServerPump;
delete mClientPump;
+ LLProxy::cleanupClass();
+ apr_pool_destroy(mPool);
}
void setupTheServer()
diff --git a/indra/test/lliohttpserver_tut.cpp b/indra/test/lliohttpserver_tut.cpp
index d12733dbee..2fdc455f45 100644
--- a/indra/test/lliohttpserver_tut.cpp
+++ b/indra/test/lliohttpserver_tut.cpp
@@ -76,14 +76,12 @@ namespace tut
HTTPServiceTestData()
: mResponse(NULL)
{
- apr_pool_create(&mPool, NULL);
LLHTTPStandardServices::useServices();
LLHTTPRegistrar::buildAllServices(mRoot);
mRoot.addNode("/delayed/echo", new DelayedEcho(this));
mRoot.addNode("/wire/hello", new LLHTTPNodeForPipe<WireHello>);
}
- apr_pool_t* mPool;
LLHTTPNode mRoot;
LLHTTPNode::ResponsePtr mResponse;
LLSD mResult;
@@ -106,8 +104,11 @@ namespace tut
LLPipeStringInjector* injector = new LLPipeStringInjector(httpRequest);
LLPipeStringExtractor* extractor = new LLPipeStringExtractor();
+ apr_pool_t* pool;
+ apr_pool_create(&pool, NULL);
+
LLPumpIO* pump;
- pump = new LLPumpIO(mPool);
+ pump = new LLPumpIO(pool);
LLPumpIO::chain_t chain;
LLSD context;
@@ -130,6 +131,7 @@ namespace tut
chain.clear();
delete pump;
+ apr_pool_destroy(pool);
if(mResponse.notNull() && timeout)
{