lordgamez commented on code in PR #1377:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1377#discussion_r931921634


##########
extensions/standard-processors/tests/integration/TestExecuteProcess.cpp:
##########
@@ -87,17 +87,15 @@ int main(int /*argc*/, char ** /*argv*/) {
   core::ProcessSessionFactory factory(contextset);
   processor->onSchedule(contextset.get(), &factory);
 
-  for (int i = 0; i < 1; i++) {
-    processor_workers.push_back(std::thread([processor, test_repo, 
&is_ready]() {
-      auto node = std::make_shared<core::ProcessorNode>(processor.get());
-      auto context = std::make_shared<core::ProcessContext>(node, nullptr, 
test_repo, test_repo);
-      
context->setProperty(org::apache::nifi::minifi::processors::ExecuteProcess::Command,
 "sleep 0.5");
-      auto session = std::make_shared<core::ProcessSession>(context);
-      while (!is_ready.load(std::memory_order_relaxed)) {
-      }
-      processor->onTrigger(context.get(), session.get());
-    }));
-  }
+  processor_workers.push_back(std::thread([processor, test_repo, &is_ready]() {
+    auto node = std::make_shared<core::ProcessorNode>(processor.get());
+    auto context = std::make_shared<core::ProcessContext>(node, nullptr, 
test_repo, test_repo);
+    
context->setProperty(org::apache::nifi::minifi::processors::ExecuteProcess::Command,
 "sleep 0.5");
+    auto session = std::make_shared<core::ProcessSession>(context);
+    while (!is_ready.load(std::memory_order_relaxed)) {
+    }
+    processor->onTrigger(context.get(), session.get());
+  }));

Review Comment:
   I agree it should be reworked and rewritten in the future, I added a jira 
ticket for this: https://issues.apache.org/jira/browse/MINIFICPP-1893



-- 
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