adam-markovics commented on code in PR #1309:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1309#discussion_r854130061


##########
extensions/http-curl/tests/C2ClearCoreComponentStateTest.cpp:
##########
@@ -86,9 +98,21 @@ class ClearCoreComponentStateHandler: public 
HeartbeatHandler {
         flow_state_ = FlowState::CLEAR_SENT;
         break;
       }
-      default:
+      case FlowState::CLEAR_SENT: {
+        using org::apache::nifi::minifi::utils::verifyEventHappenedInPollTime;
+        auto tailFileRanAgainChecker = [this] {
+          const auto logContents = 
LogTestController::getInstance().log_output.str();
+          const std::string tailingFilePattern = "[debug] Tailing file " + 
file_1_location_;
+          const std::string tailFileCommittedPattern = "[trace] ProcessSession 
committed for TailFile1";
+          const std::vector<std::string> patterns = {tailingFilePattern, 
tailingFilePattern, tailFileCommittedPattern};
+          return utils::StringUtils::matchesSequence(logContents, patterns);

Review Comment:
   Done.



##########
libminifi/src/utils/ThreadPool.cpp:
##########
@@ -200,6 +203,26 @@ template<typename T>
 void ThreadPool<T>::stopTasks(const TaskId &identifier) {
   std::unique_lock<std::mutex> lock(worker_queue_mutex_);
   task_status_[identifier] = false;
+
+  // remove tasks belonging to identifier from worker_queue_
+  worker_queue_.remove([&] (const Worker<T>& worker) { return 
worker.getIdentifier() == identifier; });
+
+  // also remove from delayed_worker_queue_
+  decltype(delayed_worker_queue_) newDelayedWorkerQueue;

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to