DBZ-5758 Use exposed mapped port for Outbox Reactive tests
This commit is contained in:
parent
31e49efc35
commit
1f41336b38
@ -40,10 +40,8 @@ public Map<String, String> start() {
|
|||||||
.withEnv("LANG", "en_US.utf8")
|
.withEnv("LANG", "en_US.utf8")
|
||||||
.withStartupTimeout(Duration.ofSeconds(30));
|
.withStartupTimeout(Duration.ofSeconds(30));
|
||||||
postgresContainer.start();
|
postgresContainer.start();
|
||||||
// needed for quarkus reactive
|
final Map properties = new HashMap<String, String>();
|
||||||
String postgresstring = "vertx-reactive:postgresql://" + postgresContainer.getHost() + ":" + "5432" + "/" + "postgres";
|
properties.put("quarkus.datasource.reactive.url", getVertxReactiveJdbcUrl(postgresContainer));
|
||||||
Map properties = new HashMap<String, String>();
|
|
||||||
properties.put("quarkus.datasource.reactive.url", postgresstring);
|
|
||||||
properties.put("quarkus.datasource.db-kind", "postgresql");
|
properties.put("quarkus.datasource.db-kind", "postgresql");
|
||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
@ -63,4 +61,9 @@ public void stop() {
|
|||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected String getVertxReactiveJdbcUrl(PostgreSQLContainer<?> container) {
|
||||||
|
// Quarkus Reactive requires accessing the database using this approach
|
||||||
|
return String.format("vertx-reactive:postgresql://%s:%d/postgres", container.getHost(), container.getMappedPort(5432));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user