Skip to content

Commit

Permalink
Merge pull request #297 from Breeding-Insight/bug/BI-1943
Browse files Browse the repository at this point in the history
BI-1947 - fix non-deterministic test
  • Loading branch information
mlm483 authored Oct 12, 2023
2 parents 0367c57 + dde1b4d commit 5359407
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,11 @@ public void setup() throws MissingRequiredInfoException, UnprocessableEntityExce
.slope(new BigDecimal("1.1"))
.build());
for(int i = 2; i < 25; i++) {
// Ensure random slope values don't overlap with hardcoded value by adding 2 to the unsigned magnitude.
newLocations.add(ProgramLocationRequest.builder()
.name("place"+i)
.abbreviation("abbrev"+i)
.slope(new BigDecimal(((Math.random()*10)%2 == 0 ? "" : "-")+Math.random()*20.0))
.slope(new BigDecimal((Math.random() > 0.5 ? "" : "-")+Math.random()))
.build());
}
for(int i = 25; i < 31; i++) {
Expand Down

0 comments on commit 5359407

Please sign in to comment.