From fc7b5549cb6092194d11b8d87600f21992305c1c Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Tue, 31 May 2022 16:54:05 -0500
Subject: SL-17484 Fix for unit tests.  Deprecate non-threaded LLQueuedThread
 and make lllfsthread threaded.

---
 indra/llimage/llimageworker.cpp            |  8 --------
 indra/llimage/llimageworker.h              |  3 ---
 indra/llimage/tests/llimageworker_test.cpp | 25 -------------------------
 3 files changed, 36 deletions(-)

(limited to 'indra/llimage')

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
@@ -190,35 +190,10 @@ 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));
-- 
cgit v1.2.3