Protecting references from GC in JDI tests

Aditya Mandaleeka adityam at microsoft.com
Mon Aug 24 23:06:44 UTC 2020


Thanks for the replies Dan and Roger.

> My recommendation would be to only use 
> ObjectReference.DisableCollection()
> when you have observed a specific failure for a specific object in a 
> test.

OK. I will submit an RFR soon to guard the specific case that we've observed consistently failing (after
ensuring that there aren't other failures that start occurring after that change). Part of me worries that
this approach won't prevent future failures in case one of the GCs changes its behavior such that the 
collections affect other unguarded objects in these tests.

-Aditya


More information about the serviceability-dev mailing list