Skip to content

Commit

Permalink
Deflake integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jskeet committed Jan 8, 2024
1 parent 41b8288 commit 2333382
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Support/Google.Apis.IntegrationTests/OidcTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public async Task OidcTokenProvider_ServiceAccountCredential()
// The test is flaky without this, because on accasion everything happens so fast
// that generation and validation happen in the same instant, and we require the token
// to have been generated in the past.
verificationOptions.IssuedAtClockTolerance = TimeSpan.FromMilliseconds(1);
verificationOptions.IssuedAtClockTolerance = TimeSpan.FromMilliseconds(10);

var payload = await JsonWebSignature.VerifySignedTokenAsync(await token.GetAccessTokenAsync(), verificationOptions);
Assert.NotNull(payload);
Expand Down Expand Up @@ -78,7 +78,7 @@ public async Task OidcTokenProvider_ComputeCredential()
// The test is flaky without this, because on accasion everything happens so fast
// that generation and validation happen in the same instant, and we require the token
// to have been generated in the past.
verificationOptions.IssuedAtClockTolerance = TimeSpan.FromMilliseconds(1);
verificationOptions.IssuedAtClockTolerance = TimeSpan.FromMilliseconds(10);

var payload = await JsonWebSignature.VerifySignedTokenAsync(await token.GetAccessTokenAsync(), verificationOptions);
Assert.NotNull(payload);
Expand Down

0 comments on commit 2333382

Please sign in to comment.