-
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
Postgres TestContainer fails with "No suitable driver found" when switching test profiles #14829
Comments
/cc @geoand |
I'll take a look next week |
This fix is pretty terrible, but I don't see any other way around the problem Fixes: quarkusio#14829
This fix is pretty terrible, but I don't see any other way around the problem Fixes: quarkusio#14829
I have only recently updated our Quarkus dependencies and found out that loading postgresql driver parent-first, causes our previously working, Postgis related, @QuarkusTest-annotated tests to fail. Our test methods are failing when comparing:
PGgeometry comes from the net.postgis:postgis-jdbc:2.5.0 which is a PostGIS JDBC Driver extension. The assertion errors look like:
The actual difference are the class loaders being used to load the org.postgis.PGgeometry class:
PgConnection has a type cache, containing the We also use the Quarkus Flyway extension which causes to create a database connection prior to running the tests. Is such behaviour anticipated and should we refactor our tests, or might this actually be a an issue? The tests work if I remove the |
Describe the bug
Setup:
Expected behavior
Expected Result:
Actual behavior
Result:
To Reproduce
See minimal example at https://github.com/patrick-vonsteht/quarkus-test-containers-test-profiles-switch-bug
Steps to reproduce the behavior:
Environment (please complete the following information):
uname -a
orver
: Microsoft Windows [Version 10.0.19042.746]java -version
: openjdk version "11" 2018-09-25OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
mvnw --version
orgradlew --version
): Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T17:06:16+02:00)Additional context
A similar issue has been fixed here: #12116
The text was updated successfully, but these errors were encountered: