hunyadi-dev commented on a change in pull request #835:
URL: https://github.com/apache/nifi-minifi-cpp/pull/835#discussion_r463528023
##########
File path: extensions/librdkafka/tests/PublishKafkaOnScheduleTests.cpp
##########
@@ -23,26 +23,36 @@
#include "../../../libminifi/test/TestBase.h"
#include "../PublishKafka.h"
#include "utils/StringUtils.h"
+#include "utils/IntegrationTestUtils.h"
class PublishKafkaOnScheduleTests : public IntegrationBase {
public:
virtual void runAssertions() {
- std::string logs = LogTestController::getInstance().log_output.str();
-
- auto result = utils::StringUtils::countOccurrences(logs, "value 1 is
outside allowed range 1000..1000000000");
- size_t last_pos = result.first;
- int occurrences = result.second;
-
- assert(occurrences > 1); // Verify retry of onSchedule and onUnSchedule
calls
-
- std::vector<std::string> must_appear_byorder_msgs = {"notifyStop called",
- "Successfully
configured PublishKafka",
- "PublishKafka
onTrigger"};
+ using org::apache::nifi::minifi::utils::verifyEventHappenedInPollTime;
+
assert(verifyEventHappenedInPollTime(std::chrono::milliseconds(wait_time_), [&]
{
+ const std::string logs =
LogTestController::getInstance().log_output.str();
+ const auto result = utils::StringUtils::countOccurrences(logs, "value
1 is outside allowed range 1000..1000000000");
+ const int occurrences = result.second;
+ return 1 < occurrences;
+ }));
+ flowController_->updatePropertyValue("kafka",
minifi::processors::PublishKafka::MaxMessageSize.getName(), "1999");
Review comment:
At least I hope there is none :)
----------------------------------------------------------------
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:
[email protected]