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

Attempt to make WaitAllStrategyTests more stable #1400

Merged
merged 1 commit into from
Apr 15, 2019

Conversation

rnorth
Copy link
Member

@rnorth rnorth commented Apr 13, 2019

@kiview WDYT?

I was finding that these tests were failing randomly ~30% of the time, which is likely to be caused by the specific timing-sensitive aspects of the code.

To be honest I also found the existing tests (the ones which exercised the timeouts behaviour) to be hard to follow, and therefore very hard to be sure that it would be both correct and stable.

So, instead, I've updated the test:

  • to keep the existing mock-based tests to check what the strategy does (agnostic of timeout durations).
  • to replace the timing-sensitive tests with some simpler tests that just check that the startupTimeouts get propagated properly. These tests don't fire the WaitAllStrategy, i.e. don't actually wait at all.

My thinking is that the combination of these two types of tests really should be enough. 'Integration testing' this would be nice, but is complicated and error prone, so testing the execution flow and the data flow, essentially, is a compromise that I'm happier with.

@bsideup bsideup added this to the next milestone Apr 15, 2019
@rnorth rnorth merged commit 6f6fb82 into master Apr 15, 2019
@delete-merged-branch delete-merged-branch bot deleted the waitallstrategy-test-stability branch April 15, 2019 09:55
@rnorth
Copy link
Member Author

rnorth commented Apr 16, 2019

Released in 1.11.2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants