Skip to content

Commit

Permalink
Merge pull request #2191 from dexidp/flaky-expiry-test
Browse files Browse the repository at this point in the history
Quick fix flaky test
  • Loading branch information
sagikazarmark committed Jun 29, 2021
2 parents 0d3d787 + ceb4324 commit 0780edb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ func makeOAuth2Tests(clientID string, clientSecret string, now func() time.Time)
return t1.Sub(t2) < within
}

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

Expand Down

0 comments on commit 0780edb

Please sign in to comment.