8334040: jdk/classfile/CorpusTest.java timed out
Reviewed-by: alanb
This commit is contained in:
parent
e825ccfe66
commit
b2930c5aee
@ -117,7 +117,7 @@ class CorpusTest {
|
|||||||
static Path[] corpus() throws IOException, URISyntaxException {
|
static Path[] corpus() throws IOException, URISyntaxException {
|
||||||
splitTableAttributes("testdata/Pattern2.class", "testdata/Pattern2-split.class");
|
splitTableAttributes("testdata/Pattern2.class", "testdata/Pattern2-split.class");
|
||||||
return Stream.of(
|
return Stream.of(
|
||||||
Files.walk(JRT.getPath("modules/java.base/java")),
|
Files.walk(JRT.getPath("modules/java.base/java/util")),
|
||||||
Files.walk(JRT.getPath("modules"), 2).filter(p -> p.endsWith("module-info.class")),
|
Files.walk(JRT.getPath("modules"), 2).filter(p -> p.endsWith("module-info.class")),
|
||||||
Files.walk(Paths.get(URI.create(CorpusTest.class.getResource("CorpusTest.class").toString())).getParent()))
|
Files.walk(Paths.get(URI.create(CorpusTest.class.getResource("CorpusTest.class").toString())).getParent()))
|
||||||
.flatMap(p -> p)
|
.flatMap(p -> p)
|
||||||
@ -140,6 +140,7 @@ class CorpusTest {
|
|||||||
for (Transforms.NoOpTransform m : Transforms.NoOpTransform.values()) {
|
for (Transforms.NoOpTransform m : Transforms.NoOpTransform.values()) {
|
||||||
if (m == Transforms.NoOpTransform.ARRAYCOPY
|
if (m == Transforms.NoOpTransform.ARRAYCOPY
|
||||||
|| m == Transforms.NoOpTransform.SHARED_3_NO_STACKMAP
|
|| m == Transforms.NoOpTransform.SHARED_3_NO_STACKMAP
|
||||||
|
|| m == Transforms.NoOpTransform.CLASS_REMAPPER
|
||||||
|| m.name().startsWith("ASM"))
|
|| m.name().startsWith("ASM"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -190,12 +191,8 @@ class CorpusTest {
|
|||||||
.collect(joining("\n"));
|
.collect(joining("\n"));
|
||||||
fail(String.format("Errors in testNullAdapt: %s", msg));
|
fail(String.format("Errors in testNullAdapt: %s", msg));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@ParameterizedTest
|
// test read and transform
|
||||||
@MethodSource("corpus")
|
|
||||||
void testReadAndTransform(Path path) throws IOException {
|
|
||||||
byte[] bytes = Files.readAllBytes(path);
|
|
||||||
var cc = ClassFile.of();
|
var cc = ClassFile.of();
|
||||||
var classModel = cc.parse(bytes);
|
var classModel = cc.parse(bytes);
|
||||||
assertEqualsDeep(ClassRecord.ofClassModel(classModel), ClassRecord.ofStreamingElements(classModel),
|
assertEqualsDeep(ClassRecord.ofClassModel(classModel), ClassRecord.ofStreamingElements(classModel),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user