-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Quarkus testing with @ParameterizedTest
broken with Java 17 + 18 (xstream)
#24492
Comments
/cc @geoand |
Could you prepare a small reproducer? We run our tests with JDK 17 and 18 so there might be something specific to your project. |
Something tells me there is some extra testing extension coming into play... Like @gsmet says, we'll need a reproducer |
Will put a reproducer together (or facepalm and close this issue, if one of our extensions is causing this w/ Java 17/18) |
The extension's |
@ParameterizedTest
broken with Java 17 + 18 (xstream)
Reproducer pushed as a PR. |
Haven't checked Guava's collections though. |
This reminds me a lot of x-stream/xstream#253 where I also documented a (not so pretty) alternate workaround. So this is an upstream issue we cannot really do anything about, so I'm closing this.
I think you've got a typo there as the following makes the test pass (via surefire
(more specifically |
PS: Anyway, thanks for reporting! |
Does it work with List.of()? Because if so, it’s probably what people will use with Java 17+. |
No, unfortunately: x-stream/xstream#253 (comment) |
That's a kinda depressing issue to read :(
Well, not a typo (as I've added it to .mvn/jvm.config + .mvn/mvnd.properites). It's been a mistake to add it to the Maven JVM - should have added it to the JVM running the tests via surefire (my bad). I'll probably just add the two |
…arameterizedTest` See quarkusio#24492
…arameterizedTest` See quarkusio#24492
…arameterizedTest` See quarkusio#24492
Avoid XStream causing illegal access issues for internal JDK collections
Relates to: quarkusio#24492 (cherry picked from commit 2aee696)
See quarkusio#24492 (cherry picked from commit 7852ea9)
Hi. I'm still seeing this on
Let me know if you want me to create a new issue. cc @geoand |
Please do |
Describe the bug
The following exception happens during tests using
@QuarkusTest
with Java 17 + 18.The failing test case is a
@ParameterizedTest
with a@MethodSource
that returns aStream
of objects that containList
instances created byArrays.asList()
- hence thejava.util.Collections$UnmodifiableCollection
.Looks like it's not a direct fault of Quarkus, but xsteam not able to deal with those objects.
Adding
--add-opens=java.base/java.util=ALL-UNNAMED
does not help.Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
17.0.2
18
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.7.5.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: