Merge branch 'stable-5.8' into stable-5.9

* stable-5.8:
  [test] Create keystore with the keytool of the running JDK
  ReachabilityCheckerTestCase: fix reachable from self test case

Change-Id: If09cbb877c674f15261715cecef7a2393bf66fa3
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
This commit is contained in:
Thomas Wolf 2021-07-29 13:09:52 +02:00
commit 59aec9b15a
2 changed files with 5 additions and 2 deletions

View File

@ -181,9 +181,12 @@ private SslContextFactory createTestSslContextFactory(String hostName) {
tmpDir.deleteOnExit();
makePrivate(tmpDir);
File keyStore = new File(tmpDir, "keystore.jks");
File keytool = new File(
new File(new File(System.getProperty("java.home")), "bin"),
"keytool");
Runtime.getRuntime().exec(
new String[] {
"keytool", //
keytool.getAbsolutePath(), //
"-keystore", keyStore.getAbsolutePath(), //
"-storepass", keyPassword,
"-alias", hostName, //

View File

@ -55,7 +55,7 @@ public void reachable() throws Exception {
assertReachable("reachable from another tip",
checker.areAllReachable(Arrays.asList(a), Stream.of(b2)));
assertReachable("reachable from itself",
checker.areAllReachable(Arrays.asList(a), Stream.of(b2)));
checker.areAllReachable(Arrays.asList(a), Stream.of(a)));
}
@Test