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

Fix test_subscription flakiness #2075

Closed
wants to merge 2 commits into from
Closed

Conversation

lxfind
Copy link
Contributor

@lxfind lxfind commented May 19, 2022

Seems to fix it locally for me. Is this ok?

@lxfind lxfind requested a review from gdanezis May 19, 2022 18:46
@lxfind lxfind marked this pull request as ready for review May 19, 2022 18:46
Copy link
Collaborator

@gdanezis gdanezis left a comment

Choose a reason for hiding this comment

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

I totally approve of the had, and the comment about the mystery (on linux I cannot observe it).

@lxfind lxfind enabled auto-merge (squash) May 19, 2022 19:19
@lxfind
Copy link
Contributor Author

lxfind commented May 19, 2022

@gdanezis Looks like this fix is causing some tests run forever in CI. I wonder if you would be able to reproduce that in Linux and see why.

@gdanezis
Copy link
Collaborator

Looking into it.

@gdanezis
Copy link
Collaborator

gdanezis commented May 20, 2022

Hey @lxfind - have a look at the modification. Comparing with t ie the instant that was returned, will always return true I think, so this was leading to an infinite loop (I think). Now I compare the amount of time elapsed since the start or last batch, which I think should increase.

However, I cannot know if this fixes the flakeyness on OSX :(.

@lxfind
Copy link
Contributor Author

lxfind commented May 20, 2022

This still fails on my Mac.
Regardless what max delay I set, it always get hit many times, and if I print out the elapsed time, it's actually does print out the max delay each time, which is very strange. The only explanation is that tokio time/interval is buggy on Mac?
What I can do is to check on system time instead of tokio time, it seems to work.

@lxfind
Copy link
Contributor Author

lxfind commented May 20, 2022

See #2094

@lxfind lxfind closed this May 20, 2022
auto-merge was automatically disabled May 20, 2022 16:06

Pull request was closed

@gdanezis gdanezis deleted the test-fix-test-subscription branch May 25, 2022 09:06
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.

2 participants