[Uptime] Fix flaky unit test snapshot#46492
Merged
justinkambic merged 14 commits intoelastic:masterfrom Oct 1, 2019
Merged
Conversation
Contributor
|
Pinging @elastic/uptime |
Contributor
💚 Build Succeeded |
Contributor
💔 Build Failed |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build Succeeded |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build Succeeded |
Contributor
💚 Build Succeeded |
Contributor
|
@elasticmachine merge upstream |
Contributor
💚 Build Succeeded |
Contributor
|
@elasticmachine merge upstream |
Contributor
💚 Build Succeeded |
Contributor
Author
|
@spalger do you think we should run this through again? And will you remove your additions from the diff when you think we're good? Thanks 👍 |
Contributor
Author
|
@elasticmachine merge upstream |
shahzad31
approved these changes
Sep 30, 2019
Contributor
shahzad31
left a comment
There was a problem hiding this comment.
Looks good , i don't understand jobs.yml file diff, rest looks good !!
| */ | ||
|
|
||
| import { assertCloseTo } from '../assert_close_to'; | ||
|
|
Contributor
There was a problem hiding this comment.
i like tests for a test helped function, it's like nice little inception going on here ;)
Contributor
💚 Build Succeeded |
added 2 commits
October 1, 2019 00:15
Contributor
💔 Build Failed |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build Succeeded |
justinkambic
added a commit
that referenced
this pull request
Oct 4, 2019
* Extract test helper function for reuse. * Modify unit test to avoid flaky behavior. * Fix outputted error string in test helper. * Add test file for test helper function. * run x-pack-intake job 40 times * Revert "run x-pack-intake job 40 times" This reverts commit 53b520c.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #46217.
In #40650 we added a helper function to avoid this same problem in other tests. There is a computed value that can sometimes be off by one. This does not impact performance or pose any problem in practice, but when performing snapshot comparisons it can be problematic.
This patch extracts that helper function, adds a test for it, and updates the existing unit test to avoid this flakiness.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers