Skip to content

Commit 0780edb

Browse files
Merge pull request #2191 from dexidp/flaky-expiry-test
Quick fix flaky test
2 parents 0d3d787 + ceb4324 commit 0780edb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/server_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,8 @@ func makeOAuth2Tests(clientID string, clientSecret string, now func() time.Time)
317317
return t1.Sub(t2) < within
318318
}
319319

320-
if !timeEq(token.Expiry, expectedExpiry, time.Second) {
320+
// TODO: This is a flaky test. We need something better (eg. clockwork).
321+
if !timeEq(token.Expiry, expectedExpiry, 2*time.Second) {
321322
return fmt.Errorf("expected expired_in to be %s, got %s", expectedExpiry, token.Expiry)
322323
}
323324

0 commit comments

Comments
 (0)