Skip to content

Commit

Permalink
Stop running the unreliable known hosts test on ci.jenkins.io
Browse files Browse the repository at this point in the history
Not valuable enough to deal with the disruption of unreliable tests.
Tests are run regularly in my CI environment without issue and they are
run by every developer that executes the tests.
  • Loading branch information
MarkEWaite committed Dec 6, 2024
1 parent 17caf34 commit c876c16
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,9 @@ public static String nonGitHubHost() {

/* Return true if known hosts tests should be run in this context */
public static boolean runKnownHostsTests() {
if (!JENKINS_URL.contains("ci.jenkins.io")) {
/* Always run the tests if not on ci.jenkins.io */
return true;
}
// Only test 10% of the time on ci.jenkins.io to reduce load on ssh providers
return ThreadLocalRandom.current().nextInt(10) == 0;
/* Run the problematic known hosts tests on all locations except ci.jenkins.io */
/* Do not run the problematic known hosts tests on ci.jenkins.io, they are unreliable */
return !JENKINS_URL.contains("ci.jenkins.io");
}

/* Always return false, retained for test compatibility */
Expand Down

0 comments on commit c876c16

Please sign in to comment.