diff options
author | Dave Parks <davep@lindenlab.com> | 2022-05-31 16:54:05 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-05-31 16:54:05 -0500 |
commit | fc7b5549cb6092194d11b8d87600f21992305c1c (patch) | |
tree | 40ef1776b4abd77405c60d64043f5782dfc3e4be /indra/llimage | |
parent | dfa71e2bb59e81de93f626fada6975ae46b01bb6 (diff) |
SL-17484 Fix for unit tests. Deprecate non-threaded LLQueuedThread and make lllfsthread threaded.
Diffstat (limited to 'indra/llimage')
-rw-r--r-- | indra/llimage/llimageworker.cpp | 8 | ||||
-rw-r--r-- | indra/llimage/llimageworker.h | 3 | ||||
-rw-r--r-- | indra/llimage/tests/llimageworker_test.cpp | 25 |
3 files changed, 0 insertions, 36 deletions
diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index 1aace5f3e8..d8503396d7 100644 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp @@ -68,14 +68,6 @@ LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(LLImageFormatted* return handle; } -// Used by unit test only -// Returns the size of the mutex guarded list as an indication of sanity -S32 LLImageDecodeThread::tut_size() -{ - LLMutexLock lock(mCreationMutex); - return 0; -} - LLImageDecodeThread::Responder::~Responder() { } diff --git a/indra/llimage/llimageworker.h b/indra/llimage/llimageworker.h index 4619ddd6a2..e0a94d2841 100644 --- a/indra/llimage/llimageworker.h +++ b/indra/llimage/llimageworker.h @@ -80,9 +80,6 @@ public: Responder* responder); S32 update(F32 max_time_ms); - // Used by unit tests to check the consistency of the thread instance - S32 tut_size(); - private: struct creation_info { diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp index 462dde9fb8..57d922b1a1 100644 --- a/indra/llimage/tests/llimageworker_test.cpp +++ b/indra/llimage/tests/llimageworker_test.cpp @@ -191,34 +191,9 @@ namespace tut template<> template<> void imagedecodethread_object_t::test<1>() { - // Test a *non threaded* instance of the class - mThread = new LLImageDecodeThread(false); - ensure("LLImageDecodeThread: non threaded constructor failed", mThread != NULL); - // Test that we start with an empty list right at creation - ensure("LLImageDecodeThread: non threaded init state incorrect", mThread->tut_size() == 0); - // Insert something in the queue - bool done = false; - LLImageDecodeThread::handle_t decodeHandle = mThread->decodeImage(NULL, 0, FALSE, new responder_test(&done)); - // Verifies we got a valid handle - ensure("LLImageDecodeThread: non threaded decodeImage(), returned handle is null", decodeHandle != 0); - // Verifies that we do now have something in the queued list - ensure("LLImageDecodeThread: non threaded decodeImage() insertion in threaded list failed", mThread->tut_size() == 1); - // Trigger queue handling "manually" (on a threaded instance, this is done on the thread loop) - S32 res = mThread->update(0); - // Verifies that we successfully handled the list - ensure("LLImageDecodeThread: non threaded update() list handling test failed", res == 0); - // Verifies that the list is now empty - ensure("LLImageDecodeThread: non threaded update() list emptying test failed", mThread->tut_size() == 0); - } - - template<> template<> - void imagedecodethread_object_t::test<2>() - { // Test a *threaded* instance of the class mThread = new LLImageDecodeThread(true); ensure("LLImageDecodeThread: threaded constructor failed", mThread != NULL); - // Test that we start with an empty list right at creation - ensure("LLImageDecodeThread: threaded init state incorrect", mThread->tut_size() == 0); // Insert something in the queue bool done = false; LLImageDecodeThread::handle_t decodeHandle = mThread->decodeImage(NULL, 0, FALSE, new responder_test(&done)); |