-
Notifications
You must be signed in to change notification settings - Fork 106
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
Improved CamelSourceTaskTest #205
Conversation
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.
Tests on CI are failing.
Yes, let me fix |
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.
Just a question.
cc @valdar
core/src/test/java/org/apache/camel/kafkaconnector/CamelSourceTaskTest.java
Show resolved
Hide resolved
core/src/test/java/org/apache/camel/kafkaconnector/CamelSourceTaskTest.java
Show resolved
Hide resolved
@fvaleri the amount of time spared is largely due to the fact that now 100 messages are sent instead of 999. I agree that at present 100 should do since in 1 millisecond is unlikely that all of them will be consumed even on a faster machine than ours (we don't know what future will hold though :) ) |
Based on my tests, the difference between 100 and 999 is negligible as it is a tight loop (so I will revert back to 999). What really slow down is the use of timer's delay option, even if we set 0 or -1, there is about 30s delay. Then, using a classic |
@fvaleri ah that is weird, surely can be explained digging into camel timer component, but I agree that we can implement the same tests avoiding |
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.
LGTM
@fvaleri thanks a lot for the PR and the patience. I am merging this with failing checks because they seem due to Github actions problems. |
@valdar no problem at all, I'm happy to contribute. Thanks. |
Merged last commit from @valdar with my previous refactoring. There is no sleep time and I have also removed timer
delay=0
option that adds about 30s delay or more. Now, on my machine, the whole suite runs consistently in about 8s vs 38s of previous version.