On 07/01/2019 21:54, Sergey Bylokhov wrote:


Probably in core-libs it works for other tests because of agentvm mode, when some other tests trigger gc, all UI and beans tests uses othervm, and most of them use OOM to trigger gc.

Tests that consume all the heap and trigger OOME will often have reliability issues, sometimes this happens when the tests are run with different combinations of VM options or when there is concurrent activity as the OOME can be triggered at different times. For the test that we are discussing here then there is no need to go there. Instead I think the weak ref + explicit GC approach is more reliable, and easier to understand too.

-Alan

Reply via email to