-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Milestone
Description
Describe the bug
If a test case pulls in a library that provides a SPI for a service used by Quarkus test configuration (e.g., FileSystemProvider), then the test cases fail during boot time with a ClassCastException due to the classloader separation introduced in 1.3
Consider the following scenario,
- In order to setup a mock SSH server, the project declares a
testdependency onorg.apache.sshd:sshd-sftp - This library provides an implementation for a virtual file system,
SftpFileSystemProvider - In the project you define a
QuarkusTestResourcefor configuring the mock SSH server - When you run the test case, it fails with a
ClassCastExceptionduring boot time.
Expected behavior
The mock SSH server should have started up properly.
Actual behavior
We observe a ClassCastException instead.
To Reproduce
Steps to reproduce the behavior:
- Clone the quarkus-sample repository
- Run
./gradlew clean build
Configuration
N/A
Screenshots
N/A
Environment (please complete the following information):
- Output of
uname -aorver: Darwin LM-SJN-40002334 18.7.0 Darwin Kernel Version 18.7.0: Mon Feb 10 21:08:45 PST 2020; root:xnu-4903.278.28~1/RELEASE_X86_64 x86_64 - Output of
java -version: openjdk version "1.8.0_232" - GraalVM version (if different from Java): N/A
- Quarkus version or git rev: 1.4.1.Final
- Build tool (ie. output of
mvnw --versionorgradlew --version): Gradle 6.3
Additional context
N/A