BI-1947 - fix non-deterministic test #297
Merged
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.
Description
Story: https://breedinginsight.atlassian.net/browse/BI-1943
The
ResponseUtilsIntegrationTest::postMultipleSearchSuccess
fails sporadically because the randomly seeded data could occasionally result in 2 records being returned from the search query instead of the expected 1.The hardcoded value that is searched for is slope=1.1, so I changed the code to ensure that the randomly created slope values will never be 1.1 (
Math.random()
produces a number in the range [0,1)).Testing
Run the
ResponseUtilsIntegrationTest
suite.Checklist: