mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-27 15:20:53 +00:00
8345631: TestRegionSamplingLogging.java#generational-rotation intermittent fails
Reviewed-by: wkemper, ruili
This commit is contained in:
parent
0091060d34
commit
4963170304
@ -59,8 +59,10 @@ public class TestRegionSamplingLogging {
|
||||
}
|
||||
|
||||
File directory = new File(".");
|
||||
File[] files = directory.listFiles((dir, name) -> name.startsWith("region-snapshots") && name.endsWith(".log"));
|
||||
File[] files = directory.listFiles((dir, name) -> name.startsWith("region-snapshots"));
|
||||
System.out.println(Arrays.toString(files));
|
||||
|
||||
// Expect one or more log files when region logging is enabled
|
||||
if (files == null || files.length == 0) {
|
||||
throw new IllegalStateException("Did not find expected snapshot log file.");
|
||||
}
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
* TestShenandoahRegionLogging
|
||||
*/
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class TestShenandoahRegionLogging {
|
||||
public static void main(String[] args) throws Exception {
|
||||
@ -40,9 +41,10 @@ public class TestShenandoahRegionLogging {
|
||||
|
||||
File directory = new File(".");
|
||||
File[] files = directory.listFiles((dir, name) -> name.startsWith("region-snapshots"));
|
||||
System.out.println(Arrays.toString(files));
|
||||
|
||||
// Expect one or more log files when region logging is enabled
|
||||
if (files.length == 0) {
|
||||
if (files == null || files.length == 0) {
|
||||
throw new Error("Expected at least one log file for region sampling data.");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user