OpenJDK / amber / amber
changeset 59208:3b9efbac1b50
8235499: Change HotSpot jtreg records test to better handle JDK updates
Reviewed-by: hseigel, iignatyev
author | darcy |
---|---|
date | Fri, 06 Dec 2019 12:13:25 -0800 |
parents | 24f9f0843abb |
children | 0bd09f6d2617 |
files | test/hotspot/jtreg/runtime/records/ignoreRecordAttribute.java test/hotspot/jtreg/runtime/records/recordReflectionTest.java |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/test/hotspot/jtreg/runtime/records/ignoreRecordAttribute.java Fri Dec 06 12:01:53 2019 -0800 +++ b/test/hotspot/jtreg/runtime/records/ignoreRecordAttribute.java Fri Dec 06 12:13:25 2019 -0800 @@ -35,7 +35,7 @@ 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 @@ "-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"); } }
--- a/test/hotspot/jtreg/runtime/records/recordReflectionTest.java Fri Dec 06 12:01:53 2019 -0800 +++ b/test/hotspot/jtreg/runtime/records/recordReflectionTest.java Fri Dec 06 12:13:25 2019 -0800 @@ -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 */