Hi Max,

I observed SocketTimeoutException on Windows only, but I suppose it can happen on other platforms.

Artem

On 09/29/2015 05:49 PM, Wang Weijun wrote:
Looks fine.

Is it Mac or Windows? Is it a SocketTimeoutException?

Thanks
Max

On 2015年9月29日, at 下午10:01, Artem Smotrakov <artem.smotra...@oracle.com> wrote:

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

Reply via email to