Skip to content

Commit

Permalink
Slightly more generous assertions for Cartesian tests (elastic#115658)
Browse files Browse the repository at this point in the history
  • Loading branch information
craigtaverner authored Oct 25, 2024
1 parent d4ac705 commit 0b94bb8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ private Matcher<Double> matchDouble(double value) {
// Most data (notably geo data) has values within bounds, and an absolute delta makes more sense.
double delta = (value > 1e28 || value < -1e28) ? Math.abs(value / 1e6)
: (value > 1e20 || value < -1e20) ? Math.abs(value / 1e10)
: (value > 1e9 || value < -1e9) ? Math.abs(value / 1e15)
: (value > 1e8 || value < -1e8) ? Math.abs(value / 1e15)
: DELTA;
return closeTo(value, delta);
}
Expand Down

0 comments on commit 0b94bb8

Please sign in to comment.