-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MINIFICPP-1281 - Improve test performance by using event polling instead of sleep by sync #835
MINIFICPP-1281 - Improve test performance by using event polling instead of sleep by sync #835
Conversation
4639d8d
to
e97d5f2
Compare
e97d5f2
to
3b9d6ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice changes, added some comments.
Not sure if waitToVerifyProcessors should be thrown out, I think waiting for something and then asserting for something else is a valid scenario.
extensions/http-curl/tests/ControllerServiceIntegrationTests.cpp
Outdated
Show resolved
Hide resolved
3b9d6ed
to
5e3fa22
Compare
5e3fa22
to
c566ab5
Compare
extensions/http-curl/tests/ControllerServiceIntegrationTests.cpp
Outdated
Show resolved
Hide resolved
@@ -34,6 +34,6 @@ int main(int argc, char **argv) { | |||
|
|||
const auto then = std::chrono::system_clock::now(); | |||
const auto seconds = std::chrono::duration_cast<std::chrono::seconds>(then - start).count(); | |||
assert(handler.calls_ <= (seconds) + 1); | |||
assert(handler.calls_ <= (seconds) + 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some libcurl black magic we do not understand. I could not figure it out but shared the problem with a group of contributors on Slack. I verified the logs and the events happening are what we expect, but curl immediately triggers the POST handle on the Civet Server twice. It was probably an issue beforehand masked by the long waiting time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the CI jobs of @fgerlits had this issue earlier as well: https://travis-ci.org/github/apache/nifi-minifi-cpp/jobs/711468287
Seems like it is indeed the case that we had this error before, but masked it away with the long waiting.
extensions/http-curl/tests/ControllerServiceIntegrationTests.cpp
Outdated
Show resolved
Hide resolved
c566ab5
to
3a99397
Compare
6423beb
to
b6a647f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump: #835 (comment)
const int occurrences = result.second; | ||
return 1 < occurrences; | ||
})); | ||
flowController_->updatePropertyValue("kafka", minifi::processors::PublishKafka::MaxMessageSize.getName(), "1999"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for the change of MaxMessageSize?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no change, it was previously in the waitToVerifyProcessor()
on line 57.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least I hope there is none :)
…e multithreaded tests
…egration tests to poll for events while waiting
…ing in verifyLogLinePresenceInPollTime
…nTests, simplify verifyLogLinePresenceInPollTime
Update comment for verifyLogLinePresenceInPollTime Co-authored-by: Ferenc Gerlits <fgerlits@users.noreply.github.com>
Co-authored-by: Márton Szász <szaszm@users.noreply.github.com>
b6a647f
to
825c1db
Compare
Decreases the avg. test execution time by 57% (from 326 seconds to 139 seconds).
Measurements on test times of master (on MacBook Pro 16-inch, 2019):
On the source branch of this PR: