equal
deleted
inserted
replaced
42 |
42 |
43 public class TestInitialGCThreadLogging { |
43 public class TestInitialGCThreadLogging { |
44 public static void main(String[] args) throws Exception { |
44 public static void main(String[] args) throws Exception { |
45 boolean noneGCSupported = true; |
45 boolean noneGCSupported = true; |
46 |
46 |
47 if (GC.ConcMarkSweep.isSupported()) { |
|
48 noneGCSupported = false; |
|
49 testInitialGCThreadLogging("UseConcMarkSweepGC", "GC Thread"); |
|
50 } |
|
51 |
|
52 if (GC.G1.isSupported()) { |
47 if (GC.G1.isSupported()) { |
53 noneGCSupported = false; |
48 noneGCSupported = false; |
54 testInitialGCThreadLogging("UseG1GC", "GC Thread"); |
49 testInitialGCThreadLogging("UseG1GC", "GC Thread"); |
55 } |
50 } |
56 |
51 |
63 noneGCSupported = false; |
58 noneGCSupported = false; |
64 testInitialGCThreadLogging("UseShenandoahGC", "Shenandoah GC Thread"); |
59 testInitialGCThreadLogging("UseShenandoahGC", "Shenandoah GC Thread"); |
65 } |
60 } |
66 |
61 |
67 if (noneGCSupported) { |
62 if (noneGCSupported) { |
68 throw new SkippedException("Skipping test because none of ConcMarkSweep/G1/Parallel/Shenandoah is supported."); |
63 throw new SkippedException("Skipping test because none of G1/Parallel/Shenandoah is supported."); |
69 } |
64 } |
70 } |
65 } |
71 |
66 |
72 private static void verifyDynamicNumberOfGCThreads(OutputAnalyzer output, String threadName) { |
67 private static void verifyDynamicNumberOfGCThreads(OutputAnalyzer output, String threadName) { |
73 output.shouldHaveExitValue(0); // test should run succesfully |
68 output.shouldHaveExitValue(0); // test should run succesfully |