From d4b2897700c66354413af42ab055bd1aaa47f91c Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 9 Oct 2009 18:56:36 -0700 Subject: Unit tests for LLMediaDataClient This required a bit of refactoring of LLMediaDataClient: - Created LLMediaDataClientObject ABC, which now has a concrete impl in LLVOVolume - Created unit test with 6 tests (for now), testing - LLObjectMediaDataClient::fetchMedia() - LLObjectMediaDataClient::updateMedia() - LLObjectMediaNavigateClient::navigate() - queue ordering - retries - nav bounce back - Also ensures that ref counting works properly (this is important, because ownership is tricky with smart pointers put into queues, peeled off into timers that fire and auto destruct, and HTTP responders that also auto-destruct) - Had to fix LLCurl::Responder's stub, which was not initializing the ref count to 0, causing the ref counting tests to fail (boy, that was hard to find!). Reviewed by Callum --- indra/llmessage/tests/llcurl_stub.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llmessage/tests/llcurl_stub.cpp') diff --git a/indra/llmessage/tests/llcurl_stub.cpp b/indra/llmessage/tests/llcurl_stub.cpp index 5dc5932fde..e6a5ad9946 100644 --- a/indra/llmessage/tests/llcurl_stub.cpp +++ b/indra/llmessage/tests/llcurl_stub.cpp @@ -22,6 +22,7 @@ #include "linden_common.h" LLCurl::Responder::Responder() + : mReferenceCount(0) { } -- cgit v1.2.3