Skip to content

Commit da0a99d

Browse files
committed
update microseconds test to be less flaky
1 parent 069ac91 commit da0a99d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sql/expression/function/time_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ package function
1616

1717
import (
1818
"fmt"
19-
"math"
2019
"testing"
2120
"time"
2221

@@ -378,7 +377,7 @@ func TestTime_Microsecond(t *testing.T) {
378377
{"null date", sql.NewRow(nil), nil, false},
379378
{"invalid type", sql.NewRow([]byte{0, 1, 2}), nil, false},
380379
{"date as string", sql.NewRow(stringDate), uint64(0), false},
381-
{"date as time", sql.NewRow(currTime), uint64(math.Round(float64(currTime.Nanosecond()) / float64(time.Microsecond))), false},
380+
{"date as time", sql.NewRow(currTime), uint64(currTime.Nanosecond()) / uint64(time.Microsecond), false},
382381
}
383382

384383
for _, tt := range testCases {

0 commit comments

Comments
 (0)