8205614: NestMates tests failing in CI jdk11-jdk.931
Summary: Fixed the wording to agree with new IAE message text
Reviewed-by: lfoltan, dcubed, mchung
--- a/test/hotspot/jtreg/runtime/Nestmates/membership/TestNestmateMembership.java Mon Jun 25 13:47:27 2018 -0400
+++ b/test/hotspot/jtreg/runtime/Nestmates/membership/TestNestmateMembership.java Mon Jun 25 14:10:44 2018 -0400
@@ -670,9 +670,8 @@
static void test_NoHostInvoke() throws Throwable {
System.out.println("Testing for missing nest-host attribute");
- String msg = "tried to access method " +
- "TestNestmateMembership$TargetNoHost.m()V from class " +
- "TestNestmateMembership$Caller";
+ String msg = "class TestNestmateMembership$Caller tried to access " +
+ "method TestNestmateMembership$TargetNoHost.m()V";
try {
Caller.invokeTargetNoHost();
throw new Error("Missing IllegalAccessError: " + msg);
@@ -698,8 +697,8 @@
check_expected(expected, msg);
}
- msg = "tried to access method TestNestmateMembership$Target.m()V" +
- " from class TestNestmateMembership$CallerNoHost";
+ msg = "class TestNestmateMembership$CallerNoHost tried to access " +
+ "method TestNestmateMembership$Target.m()V";
try {
CallerNoHost.invokeTarget();
throw new Error("Missing IllegalAccessError: " + msg);
@@ -707,8 +706,8 @@
catch (IllegalAccessError expected) {
check_expected(expected, msg);
}
- msg = "tried to access method TestNestmateMembership$TargetNoHost.m()V" +
- " from class TestNestmateMembership$CallerNoHost";
+ msg = "class TestNestmateMembership$CallerNoHost tried to access method " +
+ "TestNestmateMembership$TargetNoHost.m()V";
try {
CallerNoHost.invokeTargetNoHost();
throw new Error("Missing IllegalAccessError: " + msg);
@@ -950,8 +949,8 @@
static void test_NoHostConstruct() throws Throwable {
System.out.println("Testing for missing nest-host attribute");
- String msg = "tried to access method TestNestmateMembership$TargetNoHost.<init>()V" +
- " from class TestNestmateMembership$Caller";
+ String msg = "class TestNestmateMembership$Caller tried to access method " +
+ "TestNestmateMembership$TargetNoHost.<init>()V";
try {
Caller.newTargetNoHost();
throw new Error("Missing IncompatibleClassChangeError: " + msg);
@@ -977,8 +976,8 @@
check_expected(expected, msg);
}
- msg = "tried to access method TestNestmateMembership$Target.<init>()V" +
- " from class TestNestmateMembership$CallerNoHost";
+ msg = "class TestNestmateMembership$CallerNoHost tried to access method " +
+ "TestNestmateMembership$Target.<init>()V";
try {
CallerNoHost.newTarget();
throw new Error("Missing IncompatibleClassChangeError: " + msg);
@@ -986,8 +985,8 @@
catch (IncompatibleClassChangeError expected) {
check_expected(expected, msg);
}
- msg = "tried to access method TestNestmateMembership$TargetNoHost.<init>()V" +
- " from class TestNestmateMembership$CallerNoHost";
+ msg = "class TestNestmateMembership$CallerNoHost tried to access method " +
+ "TestNestmateMembership$TargetNoHost.<init>()V";
try {
CallerNoHost.newTargetNoHost();
throw new Error("Missing IncompatibleClassChangeError: " + msg);
--- a/test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestConstructorHierarchy.java Mon Jun 25 13:47:27 2018 -0400
+++ b/test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestConstructorHierarchy.java Mon Jun 25 14:10:44 2018 -0400
@@ -51,7 +51,7 @@
throw new Error("Unexpected construction of ExternalSuper");
}
catch (IllegalAccessError iae) {
- if (iae.getMessage().contains("tried to access method ExternalSuper.<init>()V from class TestConstructorHierarchy")) {
+ if (iae.getMessage().contains("class TestConstructorHierarchy tried to access method ExternalSuper.<init>()V")) {
System.out.println("Got expected exception constructing ExternalSuper: " + iae);
}
else throw new Error("Unexpected IllegalAccessError: " + iae);
@@ -61,7 +61,7 @@
throw new Error("Unexpected construction of NestedA and supers");
}
catch (IllegalAccessError iae) {
- if (iae.getMessage().contains("tried to access method ExternalSuper.<init>()V from class TestConstructorHierarchy$NestedA")) {
+ if (iae.getMessage().contains("class TestConstructorHierarchy$NestedA tried to access method ExternalSuper.<init>()V")) {
System.out.println("Got expected exception constructing NestedA: " + iae);
}
else throw new Error("Unexpected IllegalAccessError: " + iae);
@@ -71,7 +71,7 @@
throw new Error("Unexpected construction of ExternalSub");
}
catch (IllegalAccessError iae) {
- if (iae.getMessage().contains("tried to access method TestConstructorHierarchy$NestedA.<init>()V from class ExternalSub")) {
+ if (iae.getMessage().contains("class ExternalSub tried to access method TestConstructorHierarchy$NestedA.<init>()V")) {
System.out.println("Got expected exception constructing ExternalSub: " + iae);
}
else throw new Error("Unexpected IllegalAccessError: " + iae);