On 07/01/2019 13:00, Alan Bateman wrote:
On 07/01/2019 19:32, Sergey Bylokhov wrote:
:
I do not see the problem in the "limit xmx" + "throw/catch OOM" + "check the
results".
I guess this is only correct way to check it without possibility to introduce
infinite loop which checks weakref.get().
Why don't you like it?
An infinite loop would imply we have a bug and the test would timeout, probably
dozens of tests would timeout as we use this same idiom in several places.
Even some of the core-libs tests uses OOM:
http://hg.openjdk.java.net/jdk/jdk/file/03efcf7fc34b/test/jdk/java/util/HashMap/HashMapCloneLeak.java
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.
--
Best regards, Sergey.