Skip to content

Commit

Permalink
Merge pull request #42138 from barreiro/agroal-2.5
Browse files Browse the repository at this point in the history
Bump agroal.version from 2.4 to 2.5
  • Loading branch information
gastaldi authored Jul 26, 2024
2 parents ba68f3a + 09f5739 commit f9f95ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<!-- See root POM for hibernate-orm.version, hibernate-reactive.version, hibernate-validator.version,
hibernate-search.version, antlr.version, bytebuddy.version, hibernate-commons-annotations.version -->
<narayana.version>7.0.2.Final</narayana.version>
<agroal.version>2.4</agroal.version>
<agroal.version>2.5</agroal.version>
<jboss-transaction-spi.version>8.0.0.Final</jboss-transaction-spi.version>
<elasticsearch-opensource-components.version>8.14.3</elasticsearch-opensource-components.version>
<rxjava.version>2.2.21</rxjava.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package io.quarkus.agroal.test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

Expand Down Expand Up @@ -59,11 +57,8 @@ void testFlushOnCloseDataSourceConnection() throws SQLException {
}

try (Connection connection = defaultDataSource.getConnection()) {
assertEquals("1", connection.getClientInfo("ClientUser"));
try (Connection conn2 = defaultDataSource.getConnection()) {
// new connection should not contain any mark ClientUser
assertNull(conn2.getClientInfo("ClientUser"));
}
// new connection should not contain any mark ClientUser
assertNull(connection.getClientInfo("ClientUser"));
}
}

Expand All @@ -81,13 +76,7 @@ public void onConnectionAcquire(Connection connection) {

@Override
public void onConnectionReturn(Connection connection) {
try {
// Connection marked "ClientUser:2" must not return to the pool.
assertNotEquals("2", connection.getClientInfo("ClientUser"));
LOGGER.info("connection returned ClientUser:" + connection.getClientInfo("ClientUser"));
} catch (SQLException e) {
Assertions.fail(e);
}
Assertions.fail("unexpected connection return");
}
}
}

0 comments on commit f9f95ca

Please sign in to comment.