-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClassCastException in @ParameterizedTest: Base Class from Different Class Loader #8251
Comments
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Mar 29, 2020
The issue should be fixed by #8252 |
geoand
added a commit
to geoand/quarkus
that referenced
this issue
May 15, 2020
This is done by deep-cloning the objects into the TCCL before actually passing them to the test Fixes quarkusio#8251, fixes quarkusio#8703, fixes quarkusio#8978
geoand
added a commit
to geoand/quarkus
that referenced
this issue
May 15, 2020
This is done by deep-cloning the objects into the TCCL before actually passing them to the test Fixes quarkusio#8251, fixes quarkusio#8703, fixes quarkusio#8978
geoand
added a commit
to geoand/quarkus
that referenced
this issue
May 17, 2020
This is done by deep-cloning the objects into the TCCL before actually passing them to the test Fixes quarkusio#8251, fixes quarkusio#8703, fixes quarkusio#8978
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Running a
@QuarkusTest
fails with ajava.lang.ClassCastException
, see MWE.Expected behavior
The tests passes.
Actual behavior
When using
@ParameterizedTest
with@MethodSource
, see MWE, the test fails with the following exception:java.lang.ClassCastException: class org.hamcrest.core.Is cannot be cast to class org.hamcrest.Matcher (org.hamcrest.core.Is is in unnamed module of loader 'app'; org.hamcrest.Matcher is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @7188af83)
However, if the test parameters are mapped manually (using a regular
@Test
) it passes.To Reproduce
Steps to reproduce the behavior:
./mvnw verify
Configuration
# no properties are set explicitly
Environment (please complete the following information):
uname -a
orver
:java -version
:11.0.1, vendor: Oracle Corporation
1.3.1.Final
mvnw --version
orgradlew --version
):Additional context
The behavior occurred when I upgraded quarkus from 1.2.1.Final to 1.3.0.Final/1.3.1.Final.
The text was updated successfully, but these errors were encountered: