[9] RFR 8136600: sun/security/krb5/auto/tools/KinitConfPlusProps.java test intermittently fails because PortUnreachableException is missing
Artem Smotrakov
artem.smotrakov at oracle.com
Tue Sep 29 14:01:24 UTC 2015
Hello,
Please review this small test fix for
https://bugs.openjdk.java.net/browse/JDK-8136600
The test runs kinit, and expects PortUnreachableException because of
wrong KDC port number specified. It seems that other exceptions may be
thrown as well. That may depend on platform where the test runs, or
maybe some other circumstances. The main idea of the test is to check if
kinit fails because "java.security.krb5.kdc" and
"java.security.krb5.realm" system properties override correct values in
krb5 conf file. I think it may be better just to remove a check for
PortUnreachableException instead on adding checks for other possible
socket exception.
diff -r 2bea10d2e78f
test/sun/security/krb5/auto/tools/KinitConfPlusProps.java
--- a/test/sun/security/krb5/auto/tools/KinitConfPlusProps.java Mon Sep
28 16:39:12 2015 +0300
+++ b/test/sun/security/krb5/auto/tools/KinitConfPlusProps.java Tue Sep
29 16:50:11 2015 +0300
@@ -22,7 +22,6 @@
*/
import java.io.File;
-import java.net.PortUnreachableException;
import java.util.HashMap;
import java.util.Map;
import jdk.testlibrary.ProcessTools;
@@ -86,7 +85,6 @@
try {
OutputAnalyzer out = ProcessTools.executeCommand(command);
out.shouldHaveExitValue(-1);
- out.shouldContain(PortUnreachableException.class.getName());
} catch(Throwable e) {
System.out.println("Unexpected exception: " + e);
e.printStackTrace(System.out);
Artem
More information about the security-dev
mailing list