Skip to content

Commit

Permalink
tests: increase delta for flaky float comparison (#3122)
Browse files Browse the repository at this point in the history
* tests: increase delta for flaky float comparison

* remove leading 0 from non-octal number
  • Loading branch information
mmetc authored Jul 15, 2024
1 parent f130ce6 commit 9146383
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/exprhelpers/exprlib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ func TestGetActiveDecisionsTimeLeft(t *testing.T) {
},
}

delta := 0.0001
delta := 0.001

for _, test := range tests {
program, err := expr.Compile(test.code, GetExprOptions(test.env)...)
Expand Down Expand Up @@ -1392,12 +1392,12 @@ func TestParseUnixTime(t *testing.T) {
{
name: "ParseUnix() test: valid value with milli",
value: "1672239773.3590894",
expected: time.Date(2022, 12, 28, 15, 02, 53, 0, time.UTC),
expected: time.Date(2022, 12, 28, 15, 2, 53, 0, time.UTC),
},
{
name: "ParseUnix() test: valid value without milli",
value: "1672239773",
expected: time.Date(2022, 12, 28, 15, 02, 53, 0, time.UTC),
expected: time.Date(2022, 12, 28, 15, 2, 53, 0, time.UTC),
},
{
name: "ParseUnix() test: invalid input",
Expand Down

0 comments on commit 9146383

Please sign in to comment.