diff -r 0a84d339822a -r d66b18f52418 jdk/test/sun/security/krb5/auto/MaxRetries.java --- a/jdk/test/sun/security/krb5/auto/MaxRetries.java Tue Mar 11 19:54:33 2014 +0400 +++ b/jdk/test/sun/security/krb5/auto/MaxRetries.java Wed Mar 12 14:18:01 2014 +0800 @@ -60,7 +60,7 @@ test1(5000, 2); // 2 2 // For tryLess - Security.setProperty("krb5.kdc.bad.policy", "tryless"); + Security.setProperty("krb5.kdc.bad.policy", "tryless:1," + BadKdc.toReal(5000)); rewriteMaxRetries(4); test1(4000, 7); // 1 1 1 1 2 1 2 test1(4000, 4); // 1 2 1 2 @@ -94,7 +94,7 @@ * @param count the expected total try */ private static void test1(int timeout, int count) throws Exception { - String timeoutTag = "timeout=" + timeout; + String timeoutTag = "timeout=" + BadKdc.toReal(timeout); ByteArrayOutputStream bo = new ByteArrayOutputStream(); PrintStream oldout = System.out; System.setOut(new PrintStream(bo)); @@ -192,12 +192,12 @@ if (s.startsWith("[realms]")) { // Reconfig global setting fw.write("max_retries = 2\n"); - fw.write("kdc_timeout = 5000\n"); + fw.write("kdc_timeout = " + BadKdc.toReal(5000) + "\n"); } else if (s.trim().startsWith("kdc = ")) { if (value != -1) { // Reconfig for realm fw.write(" max_retries = " + value + "\n"); - fw.write(" kdc_timeout = " + (value*1000) + "\n"); + fw.write(" kdc_timeout = " + BadKdc.toReal(value*1000) + "\n"); } // Add a bad KDC as the first candidate fw.write(" kdc = localhost:33333\n");