hunyadi-dev commented on a change in pull request #835:
URL: https://github.com/apache/nifi-minifi-cpp/pull/835#discussion_r451561893
##########
File path: extensions/http-curl/tests/VerifyInvokeHTTPTest.cpp
##########
@@ -93,47 +95,55 @@ class VerifyInvokeHTTP : public CoapIntegrationBase {
flowController_->unload();
flowController_->stopC2();
- runAssertions();
cleanup();
}
};
class VerifyInvokeHTTPOKResponse : public VerifyInvokeHTTP {
-public:
- virtual void runAssertions() override {
-
assert(LogTestController::getInstance().contains("key:invokehttp.status.code
value:201"));
- assert(LogTestController::getInstance().contains("response code 201"));
+ public:
+ void runAssertions() override {
+ using org::apache::nifi::minifi::utils::verifyLogLinePresenceInPollTime;
+ assert(verifyLogLinePresenceInPollTime(std::chrono::seconds(6),
Review comment:
This is a maximum value, and the test would probably run for far less
time. `contains` was running for 3 seconds, but the `waitForVerifyProcessor`
added an extra 6 seconds (line 35 of this file). I went with keeping the flat 6
seconds, because this is seems like the time frame these logs should have been
produced, and not the 3 seconds the log checking introduced.
----------------------------------------------------------------
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]