EsotericSoftware / EsotericSoftware/reflectasm

ClassLoaderTest.testAutoUnloadClassloaders is flaky

Open
#91 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.5k
Forks
217
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.