Skip to content
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

Merged
merged 1 commit into from
May 11, 2020
Merged

Improved CamelSourceTaskTest #205

merged 1 commit into from
May 11, 2020

Conversation

fvaleri
Copy link

@fvaleri fvaleri commented May 11, 2020

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.

Copy link
Contributor

@oscerd oscerd left a 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.

@fvaleri
Copy link
Author

fvaleri commented May 11, 2020

Yes, let me fix testSourcePollingTimeout and push force.

@fvaleri fvaleri requested a review from oscerd May 11, 2020 09:19
Copy link
Contributor

@oscerd oscerd left a 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

@valdar
Copy link
Member

valdar commented May 11, 2020

@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 :) )

@fvaleri
Copy link
Author

fvaleri commented May 11, 2020

@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 fori instead of Stream's foreach to send batch test records is also faster.

@fvaleri fvaleri requested a review from valdar May 11, 2020 13:18
@valdar
Copy link
Member

valdar commented May 11, 2020

@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 timer delay option.

Copy link
Member

@valdar valdar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@valdar valdar merged commit 5593ea7 into apache:master May 11, 2020
@valdar
Copy link
Member

valdar commented May 11, 2020

@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.

@fvaleri
Copy link
Author

fvaleri commented May 11, 2020

@valdar no problem at all, I'm happy to contribute. Thanks.

@fvaleri fvaleri deleted the no-flaky branch May 22, 2020 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants