RFR: 8261483: jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java failed with "AssertionError: Should have GCd a method handle by now" [v3]

Aleksey Shipilev shade at openjdk.java.net
Sun Feb 28 07:23:45 UTC 2021


On Sat, 27 Feb 2021 20:01:10 GMT, Attila Szegedi <attila at openjdk.org> wrote:

>> 8261483: jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java failed with "AssertionError: Should have GCd a method handle by now"
>
> Attila Szegedi has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
> 
>   8261483: Eliminate flakiness of the tests by using iteration number limit and explicitly running GC

Changes requested by shade (Reviewer).

test/jdk/jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java line 32:

> 30:  * @run main/othervm -XX:+UseParallelGC TypeConverterFactoryMemoryLeakTest
> 31:  * @run main/othervm -XX:+UseZGC TypeConverterFactoryMemoryLeakTest
> 32:  * @run main/othervm -XX:+UseShenandoahGC TypeConverterFactoryMemoryLeakTest

Ah, here is a test trivia. Some configurations do not have either ZGC or Shenandoah. So you need to check GC availabilty before adding `@run`. For consistency, checking every GC availability is even better. Usually done by splitting the `@test` blocks, and adding `@requires` tags: https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/serviceability/dcmd/gc/HeapDumpCompressedTest.java#L37-L107

-------------

PR: https://git.openjdk.java.net/jdk/pull/2617


More information about the core-libs-dev mailing list