arpadboda commented on a change in pull request #710: MINIFICPP - 1110,1111 - 
PublishKafka, OPC processors should config and
URL: https://github.com/apache/nifi-minifi-cpp/pull/710#discussion_r375835365
 
 

 ##########
 File path: libminifi/test/integration/OnScheduleErrorHandlingTests.cpp
 ##########
 @@ -29,32 +27,22 @@ class OnScheduleErrorHandlingTests : public 
IntegrationBase {
  public:
   virtual void runAssertions() {
     std::string logs = LogTestController::getInstance().log_output.str();
-    size_t pos = 0;
-    size_t last_pos = 0;
-    unsigned int occurances = 0;
-    do {
-      pos = 
logs.find(minifi::processors::KamikazeProcessor::OnScheduleExceptionStr, pos);
-      if (pos != std::string::npos) {
-        last_pos = pos;
-        pos = 
logs.find(minifi::processors::KamikazeProcessor::OnUnScheduleLogStr, pos);
-        if (pos != std::string::npos) {
-          last_pos = pos;
-          occurances++;
-        }
-      }
-    } while (pos != std::string::npos);
 
-    assert(occurances > 1);  // Verify retry of onSchedule and onUnSchedule 
calls
+    auto result = countPatInStr(logs, 
minifi::processors::KamikazeProcessor::OnScheduleExceptionStr);
+    size_t last_pos = result.first;
+    unsigned int occurances = result.second;
 
 Review comment:
   Will need to change this to uint32_t as well

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to