Commit d3853fcc authored by Alex Light's avatar Alex Light
Browse files

Make EnableCollection using tests more robust

The EnableCollection and the IsCollected tests are somewhat flakey
since they don't check that a GC has actually had time to happen. We
fix this by making them both all allocate a marker object that they
will wait to be collected before continuing the test, meaning that at
least one GC has occurred.  This also unifies the 3 different
(incorrect) ways the tests tried to force a GC.

Test: while ./art/tools/run-libjdwp-tests.sh --mode=host --test org.apache.harmony.jpda.tests.jdwp.MultiSession.EnableCollectionTest; do; done;
Test: while ./art/tools/run-libjdwp-tests.sh --mode=host --test org.apache.harmony.jpda.tests.jdwp.ObjectReference.EnableCollectionTest; do; done;
Test: while ./art/tools/run-libjdwp-tests.sh --mode=host --test org.apache.harmony.jpda.tests.jdwp.ObjectReference.IsCollectedTest; do; done;

Bug: 70958370
Bug: 69121056

Change-Id: I4f49c4fa4b9105fc1c2a66c9299407262ab6141f
parent 4485d56f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment