Skip to content

Commit 5327996

Browse files
committed
8340389
Hi all, please review this fix to the phantom001 test to do much less garbage collections that inhibit passing the test. Testing: gha, running the test for 1000 times with the problematic options Thanks, Thomas
1 parent ebc17c7 commit 5327996

File tree

1 file changed

+1
-1
lines changed
  • test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001

1 file changed

+1
-1
lines changed

test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ public void run() {
177177
// If referent is finalizable, provoke GCs and wait for finalization.
178178
if (type.equals("class")) {
179179
progress("Waiting for finalization: " + type);
180+
WhiteBox.getWhiteBox().fullGC();
180181
for (int checks = 0; !finalized && !shouldTerminate(); ++checks) {
181182
// There are scenarios where one WB.fillGC() isn't enough,
182183
// but 10 iterations really ought to be sufficient.
183184
if (checks > 10) {
184185
fail("Waiting for finalization: " + type);
185186
return;
186187
}
187-
WhiteBox.getWhiteBox().fullGC();
188188
// Give some time for finalizer to run.
189189
try {
190190
Thread.sleep(checks * 100);

0 commit comments

Comments
 (0)