mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8373642: Test vmTestbase/nsk/monitoring/GarbageCollectorMXBean/CollectionCounters/CollectionCounters003/TestDescription.java failed
Reviewed-by: cjplummer, syan
This commit is contained in:
parent
97f4f003f4
commit
a1a75ab6d1
@ -35,6 +35,7 @@
|
||||
* @run main/othervm -XX:-UseGCOverheadLimit
|
||||
* nsk.monitoring.GarbageCollectorMXBean.CollectionCounters.CollectionCounters001.CollectionCounters001
|
||||
* -testMode=directly
|
||||
* -iterations=5
|
||||
*/
|
||||
|
||||
package nsk.monitoring.GarbageCollectorMXBean.CollectionCounters.CollectionCounters001;
|
||||
@ -79,30 +80,27 @@ public class CollectionCounters001 extends MonitoringTestBase implements RunPara
|
||||
private void runOne(ExecutionController stresser) {
|
||||
updateCounters();
|
||||
validate(false /* don't check gc count increases */);
|
||||
int iteration = 0;
|
||||
do {
|
||||
System.out.println("=========== stresser iter: " + (stresser.getIteration())
|
||||
+ " runOne iter: " + (++iteration) + " ===========");
|
||||
Algorithms.eatMemory(stresser);
|
||||
updateCounters();
|
||||
validate(true);
|
||||
System.gc();
|
||||
updateCounters();
|
||||
validate(true);
|
||||
memory.gc();
|
||||
updateCounters();
|
||||
validate(true);
|
||||
} while (stresser.continueExecution());
|
||||
Algorithms.eatMemory(stresser);
|
||||
updateCounters();
|
||||
validate(true);
|
||||
System.gc();
|
||||
updateCounters();
|
||||
validate(true);
|
||||
memory.gc();
|
||||
updateCounters();
|
||||
validate(true);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
stresser = new Stresser(runParams.getStressOptions());
|
||||
stresser.start(runParams.getIterations());
|
||||
while (stresser.iteration()) {
|
||||
do {
|
||||
System.out.println("=========== stresser iter: " + (stresser.getIteration()) + " ===========");
|
||||
runOne(stresser);
|
||||
}
|
||||
} while (stresser.iteration());
|
||||
}
|
||||
|
||||
|
||||
private void validate(boolean gcCountMustIncrease) {
|
||||
if (collectionCount < 0)
|
||||
throw new TestFailure("collectionCount negative: " + collectionCount);
|
||||
|
||||
@ -36,5 +36,6 @@
|
||||
* nsk.monitoring.GarbageCollectorMXBean.CollectionCounters.CollectionCounters001.CollectionCounters001
|
||||
* -testMode=server
|
||||
* -MBeanServer=default
|
||||
* -iterations=5
|
||||
*/
|
||||
|
||||
|
||||
@ -36,5 +36,6 @@
|
||||
* nsk.monitoring.GarbageCollectorMXBean.CollectionCounters.CollectionCounters001.CollectionCounters001
|
||||
* -testMode=server
|
||||
* -MBeanServer=custom
|
||||
* -iterations=5
|
||||
*/
|
||||
|
||||
|
||||
@ -36,5 +36,6 @@
|
||||
* nsk.monitoring.GarbageCollectorMXBean.CollectionCounters.CollectionCounters001.CollectionCounters001
|
||||
* -testMode=proxy
|
||||
* -MBeanServer=default
|
||||
* -iterations=5
|
||||
*/
|
||||
|
||||
|
||||
@ -36,5 +36,6 @@
|
||||
* nsk.monitoring.GarbageCollectorMXBean.CollectionCounters.CollectionCounters001.CollectionCounters001
|
||||
* -testMode=proxy
|
||||
* -MBeanServer=custom
|
||||
* -iterations=5
|
||||
*/
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user