# HG changeset patch # User weijun # Date 1471684217 -28800 # Node ID 84a6dc93eef8fd1638eb0181844b6d841d35e339 # Parent 0d68f70ab9840f4a7fb1b0dc16e006e93c8c5e1b 8164437: Test for JDK-8042900 Summary: GSSContext is of a different type when jdk.security.jgss is not loaded Reviewed-by: xuelei diff -r 0d68f70ab984 -r 84a6dc93eef8 jdk/test/sun/security/krb5/auto/Basic.java --- a/jdk/test/sun/security/krb5/auto/Basic.java Fri Aug 19 23:24:23 2016 +0000 +++ b/jdk/test/sun/security/krb5/auto/Basic.java Sat Aug 20 17:10:17 2016 +0800 @@ -23,10 +23,13 @@ /* * @test - * @bug 7152176 + * @bug 7152176 8164437 * @summary More krb5 tests * @compile -XDignore.symbol.file Basic.java - * @run main/othervm Basic + * @run main/othervm + * Basic jdk.security.jgss + * @run main/othervm --limit-modules java.security.jgss,jdk.security.auth + * Basic java.security.jgss */ import sun.security.jgss.GSSUtil; @@ -60,5 +63,12 @@ b.startAsServer(GSSUtil.GSS_KRB5_MECH_OID); Context.handshake(s2, b); + + // Bonus test for 8164437. + String moduleName = c.x().getClass().getModule().getName(); + if (!moduleName.equals(args[0])) { + throw new Exception("Expected: " + args[0] + + ". Actual: " + moduleName); + } } }