Skip to content

Test DataSource not used in 1.4.1.Final #8901

@pschyma

Description

@pschyma

Describe the bug
Tests use only the DataSource configured in main resources instead of the one in test resources.

Expected behavior
The in-memory DataSource configured in the test resources is used like in 1.4.0.CR1 and before.

Actual behavior
The in-memory test resource H2 database is started but agroal is configured to use main resources PostgreSQL DataSource.

To Reproduce
Steps to reproduce the behavior:

  1. Configure a data source in main resources.
  2. Configure a data source in test resources.
  3. Shutdown main data base.
  4. Execute tests accessing the database.

Configuration
Main application.properties:

# Add your application.properties here, if applicable.
quarkus.datasource.db-kind = postgresql
quarkus.datasource.jdbc.url = jdbc:postgresql://localhost:2345/test-db
quarkus.datasource.username = postgres
quarkus.datasource.password = secret

Test application.properties:

# Add your application.properties here, if applicable.
quarkus.datasource.url = jdbc:h2:tcp://localhost/mem:test-db;MODE=PostgreSQL
quarkus.datasource.driver = org.h2.Driver

Screenshots
(If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

  • Output of uname -a or ver: Linux voyager 5.6.7-arch1-1 Switch to the Maven distributed copy of the SubstrateVM annotations #1 SMP PREEMPT Thu, 23 Apr 2020 09:13:56 +0000 x86_64 GNU/Linux
  • Output of java -version: openjdk version "11.0.6" 2020-01-14
    OpenJDK Runtime Environment GraalVM CE 20.0.0 (build 11.0.6+9-jvmci-20.0-b02)
    OpenJDK 64-Bit Server VM GraalVM CE 20.0.0 (build 11.0.6+9-jvmci-20.0-b02, mixed mode, sharing)
  • GraalVM version (if different from Java):
  • Quarkus version or git rev: 1.4.1.Final
  • Build tool (ie. output of mvnw --version or gradlew --version): Gradle 6.3

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions