Solve legacy problem with clear operation (coredump with running threads)
[anna.git] / source / testing / TestStep.cpp
index d975ddd..5355024 100644 (file)
@@ -56,8 +56,8 @@ namespace {
 
   void cmdRunOnThread (TestStepCmd *step, const std::string &cmd) {
 
-    // Thread running:
-    step->setThreadRunning(true);
+    // Thread running (will be set to false at complete()):
+    step->setThreadRunning();
 
     int status = -2;
 
@@ -757,7 +757,7 @@ void TestStepCmd::do_complete() throw() {
     std::cout << "Executed Command Test Step (" << a_script << ") [rc=" << a_resultCode << "]" << std::endl;
   }
 
-  a_threadRunning = false;
+  setThreadNotRunning();
   if (a_threadDeprecated) {
     a_threadDeprecated = false;
     do_reset();