Merge branch 'stable-5.11' into stable-5.12

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

Change-Id: Ie8db450a1fad05bddb812a55b2ceb03b2805403a
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
This commit is contained in:
Thomas Wolf 2021-07-29 13:11:54 +02:00
commit 65de0d4863
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

@ -57,7 +57,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