8235499: Change HotSpot jtreg records test to better handle JDK updates
Reviewed-by: hseigel, iignatyev
This commit is contained in:
parent
72cb073c09
commit
0da41b464e
@ -35,7 +35,7 @@ import jdk.test.lib.process.OutputAnalyzer;
|
||||
public class ignoreRecordAttribute {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
String MAJOR_VERSION = Integer.toString(44 + Runtime.version().feature());
|
||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("--enable-preview",
|
||||
"-Xlog:class+record", "-Xshare:off", "superNotJLRecord");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
@ -46,7 +46,7 @@ public class ignoreRecordAttribute {
|
||||
"-Xlog:class+record", "-Xshare:off", "recordIgnoredVersion");
|
||||
output = new OutputAnalyzer(pb.start());
|
||||
output.shouldContain("Ignoring Record attribute");
|
||||
output.shouldContain("because class file version is not 58.65535");
|
||||
output.shouldContain("because class file version is not " + MAJOR_VERSION + ".65535");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @compile --enable-preview --source 14 recordReflectionTest.java
|
||||
* @compile --enable-preview --source ${jdk.version} recordReflectionTest.java
|
||||
* @run main/othervm --enable-preview recordReflectionTest
|
||||
*/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user