Răsfoiți Sursa

Testing: thread safe unit test updates

Anatoli Arkhipenko 4 luni în urmă
părinte
comite
47d2752079
2 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 2 1
      tests/test-queue-impl.cpp
  2. 1 1
      tests/test-queue-impl.h

+ 2 - 1
tests/test-queue-impl.cpp

@@ -6,6 +6,7 @@
 
 // Define thread-safe features before including TaskScheduler
 // defined in the test.yml
+#include "test-queue-impl.h"
 #include "TaskSchedulerDeclarations.h"
 
 #include <thread>
@@ -21,7 +22,7 @@
 std::queue<_task_request_t> taskRequestQueue;
 std::mutex queueMutex;
 std::condition_variable queueCV;
-const size_t MAX_QUEUE_SIZE = 100;
+
 
 /**
  * @brief Enqueue a task request (Linux implementation)

+ 1 - 1
tests/test-queue-impl.h

@@ -11,7 +11,7 @@ void clearTaskRequestQueue();
 size_t getQueueSize();
 
 // Maximum queue size constant
-extern const size_t MAX_QUEUE_SIZE;
+#define MAX_QUEUE_SIZE 100
 
 bool _task_dequeue_request(_task_request_t* req);
 bool _task_enqueue_request(_task_request_t* req);