Skip to content

Commit

Permalink
Merge pull request #716 from jenkinsci/deflake-GithubAppCredentialsAp…
Browse files Browse the repository at this point in the history
…pInstallationTokenTest

deflake GithubAppCredentialsAppInstallationTokenTest
  • Loading branch information
jtnord authored Aug 7, 2023
2 parents ff97c8a + d5dc73d commit 3f1889a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public void testProviderRefresh() throws Exception {

// We want to demonstrate successful caching without waiting for the default 1 minute
// Must set this to a large enough number to avoid flaky test
GitHubAppCredentials.AppInstallationToken.NOT_STALE_MINIMUM_SECONDS = 5;
GitHubAppCredentials.AppInstallationToken.NOT_STALE_MINIMUM_SECONDS = 10;

// Ensure we are working from sufficiently clean cache state
Thread.sleep(Duration.ofSeconds(GitHubAppCredentials.AppInstallationToken.NOT_STALE_MINIMUM_SECONDS + 2)
Expand Down Expand Up @@ -362,7 +362,7 @@ public void testAgentRefresh() throws Exception {

// We want to demonstrate successful caching without waiting for a the default 1 minute
// Must set this to a large enough number to avoid flaky test
GitHubAppCredentials.AppInstallationToken.NOT_STALE_MINIMUM_SECONDS = 5;
GitHubAppCredentials.AppInstallationToken.NOT_STALE_MINIMUM_SECONDS = 10;

// Ensure we are working from sufficiently clean cache state
Thread.sleep(Duration.ofSeconds(GitHubAppCredentials.AppInstallationToken.NOT_STALE_MINIMUM_SECONDS + 2)
Expand Down Expand Up @@ -479,7 +479,7 @@ public void testPassword() throws Exception {

// We want to demonstrate successful caching without waiting for the default 1 minute
// Must set this to a large enough number to avoid flaky test
GitHubAppCredentials.AppInstallationToken.NOT_STALE_MINIMUM_SECONDS = 5;
GitHubAppCredentials.AppInstallationToken.NOT_STALE_MINIMUM_SECONDS = 10;

// Ensure we are working from sufficiently clean cache state
Thread.sleep(Duration.ofSeconds(GitHubAppCredentials.AppInstallationToken.NOT_STALE_MINIMUM_SECONDS + 2)
Expand Down

0 comments on commit 3f1889a

Please sign in to comment.