Skip to content

ClassLoaderTest.testAutoUnloadClassloaders is flaky #91

@pgrt

Description

@pgrt

Hello,

On Debian unstable or testing, version 1.11.9 of reflectasm is packaged, and the default JDK is OpenJDK-17.

The build-time test ClassLoaderTest.testAutoUnloadClassloaders fails from time to time (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031480#5 for the complete log), with the message

[ERROR] testAutoUnloadClassloaders(com.esotericsoftware.reflectasm.ClassLoaderTest) Time elapsed: 0.021 s <<< FAILURE!
junit.framework.AssertionFailedError: expected:<3> but was:<2>
at com.esotericsoftware.reflectasm.ClassLoaderTest.testAutoUnloadClassloaders(ClassLoaderTest.java:63)

To reproduce, one can install the Debian libreflectasm-java package, then unpack the source and run (several times for the last line, until it fails):

$ cd test
$ javac -cp /usr/share/java/reflectasm.jar:/usr/share/java/junit4.jar com/esotericsoftware/reflectasm/ClassLoaderTest.java
$ java -cp .:/usr/share/java/junit4.jar:/usr/share/java/reflectasm.jar org.junit.runner.JUnitCore com.esotericsoftware.reflectasm.ClassLoaderTest

I notice the failure happens when initialCount is 1. When it is 0, I get no failure.

Hoping this can help,

Best,

--
Pierre

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions