Skip to content

Commit 6646a80

Browse files
blafondDavideD
authored andcommitted
[#864] removed loggerLevel parameter from jdbc URL
1 parent 43ae988 commit 6646a80

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

hibernate-reactive-core/src/test/java/org/hibernate/reactive/containers/PostgreSQLDatabase.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class PostgreSQLDatabase implements TestableDatabase {
8989
.withReuse( true );
9090

9191
private String getRegularJdbcUrl() {
92-
return "jdbc:postgresql://localhost:5432/" + postgresql.getDatabaseName() + "?loggerLevel=OFF";
92+
return "jdbc:postgresql://localhost:5432/" + postgresql.getDatabaseName();
9393
}
9494

9595
@Override
@@ -117,14 +117,16 @@ private String address() {
117117
// Calling start() will start the container (if not already started)
118118
// It is required to call start() before obtaining the JDBC URL because it will contain a randomized port
119119
postgresql.start();
120-
return postgresql.getJdbcUrl();
120+
// Latest Postgres JDBC driver has dropped support for loggerLevel
121+
// and the Vert.x driver throws an exception because it does not recognize it
122+
return postgresql.getJdbcUrl().replace( "?loggerLevel=OFF", "" );
121123
}
122124

123125
return getRegularJdbcUrl();
124126
}
125127

126128
private static String buildJdbcUrlWithCredentials(String jdbcUrl) {
127-
return jdbcUrl + "&user=" + postgresql.getUsername() + "&password=" + postgresql.getPassword();
129+
return jdbcUrl + "?user=" + postgresql.getUsername() + "&password=" + postgresql.getPassword();
128130
}
129131

130132
private static String buildUriWithCredentials(String jdbcUrl) {

0 commit comments

Comments
 (0)