From 5c1cb0f56bfd7340959fb0fc2a22e52607f6ea1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Vav=C5=99=C3=ADk?= Date: Wed, 10 Jul 2024 15:03:47 +0200 Subject: [PATCH] Fix MySQL resource resolution on Windows --- .../sqldb/panacheflyway/dbpool/MySqlDatabaseTestResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-db/panache-flyway/src/test/java/io/quarkus/ts/sqldb/panacheflyway/dbpool/MySqlDatabaseTestResource.java b/sql-db/panache-flyway/src/test/java/io/quarkus/ts/sqldb/panacheflyway/dbpool/MySqlDatabaseTestResource.java index c5bb13348..90f7d95ac 100644 --- a/sql-db/panache-flyway/src/test/java/io/quarkus/ts/sqldb/panacheflyway/dbpool/MySqlDatabaseTestResource.java +++ b/sql-db/panache-flyway/src/test/java/io/quarkus/ts/sqldb/panacheflyway/dbpool/MySqlDatabaseTestResource.java @@ -45,7 +45,7 @@ public Map start() { container.withEnv(DATABASE_PROPERTY, DEFAULT_SCHEMA); container.start(); - var jdbcUrl = "jdbc:mysql://localhost:%d/%s".formatted(container.getMappedPort(3306), DEFAULT_SCHEMA); + var jdbcUrl = "jdbc:mysql://%s:%d/%s".formatted(container.getHost(), container.getMappedPort(3306), DEFAULT_SCHEMA); Map config = new HashMap<>(); config.put(defaultDataSource(QUARKUS_DB_JDBC_URL), jdbcUrl); config.put(defaultDataSource(QUARKUS_DB_USER), USER);