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

BI-1947 - fix non-deterministic test #297

Merged
merged 4 commits into from
Oct 12, 2023
Merged

BI-1947 - fix non-deterministic test #297

merged 4 commits into from
Oct 12, 2023

Conversation

mlm483
Copy link
Contributor

@mlm483 mlm483 commented Oct 5, 2023

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:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have tested that my code works with both the brapi-java-server and BreedBase
  • I have create/modified unit tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: <please include a link to TAF run>

@github-actions github-actions bot added the bug Something isn't working label Oct 5, 2023
@mlm483 mlm483 marked this pull request as ready for review October 5, 2023 18:08
@mlm483 mlm483 requested review from a team, davedrp and dmeidlin and removed request for a team October 5, 2023 18:08
Copy link
Contributor

@davedrp davedrp left a comment

Choose a reason for hiding this comment

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

Developer testing note: could not prove that the code fixed the problem (but it certainly has)

@mlm483 mlm483 merged commit 5359407 into develop Oct 12, 2023
@mlm483 mlm483 deleted the bug/BI-1943 branch October 12, 2023 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants