Closed chrispysz closed 8 months ago
Hi @chrispysz, thank you for reporting this issue.
The current implementation does not support reusable
data source dev-services.
https://quarkus.io/guides/databases-dev-services#reuse
You can disable it.
quarkus.datasource.devservices.reuse=false
The disadvantage is that Quarkus starts the new database container every time the tests are repeated.
Fix in release version 2.13.0
.
Quarkus version: 2.16.9.Final
Steps to reproduce:
Clone this small example project or setup a new one only with hibernate, pg-jdbc, resteasy and db-import extensions https://github.com/chrispysz/quarkus2-playground
Run mvn quarkus:dev
Press "r" (test should pass)
Press "r" again (test fails)
2023-10-27 12:34:02,055 ERROR [io.qua.test] (Test runner thread) Test GreetingResourceTest#testHelloEndpoint() failed : java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step org.tkit.quarkus.test.dbimport.DevServicesDbImportProcessor#startDbImportDevService threw an exception: java.lang.NullPointerException: Cannot invoke "io.quarkus.datasource.deployment.spi.DevServicesDatasourceResultBuildItem.getDefaultDatasource()" because "devServiceDatasource" is null at org.tkit.quarkus.test.dbimport.DevServicesDbImportProcessor.startDbImportDevService(DevServicesDbImportProcessor.java:51)