HHH-13035 Upgrade Agroal to 1.2

This commit is contained in:
Guillaume Smet 2018-10-16 11:15:41 +02:00
parent 8c00814dbe
commit 8a6d5e711a
4 changed files with 6 additions and 11 deletions

View File

@ -133,8 +133,8 @@ ext {
proxool: "proxool:proxool:0.8.3",
hikaricp: "com.zaxxer:HikariCP:2.5.1",
vibur: "org.vibur:vibur-dbcp:22.1",
agroal_api: "io.agroal:agroal-api:0.4",
agroal_pool: "io.agroal:agroal-pool:0.4",
agroal_api: "io.agroal:agroal-api:1.2",
agroal_pool: "io.agroal:agroal-pool:1.2",
atomikos: "com.atomikos:transactions:4.0.6",
atomikos_jta: "com.atomikos:transactions-jta:4.0.6",

View File

@ -80,7 +80,7 @@ public class AgroalConnectionProvider implements ConnectionProvider, Configurabl
try {
AgroalPropertiesReader agroalProperties = new AgroalPropertiesReader( CONFIG_PREFIX ).readProperties( props );
agroalProperties.modify().connectionPoolConfiguration( cp -> cp.connectionFactoryConfiguration( cf -> {
copyProperty( props, AvailableSettings.DRIVER, cf::driverClassName, Function.identity() );
copyProperty( props, AvailableSettings.DRIVER, cf::connectionProviderClassName, Function.identity() );
copyProperty( props, AvailableSettings.URL, cf::jdbcUrl, Function.identity() );
copyProperty( props, AvailableSettings.USER, cf::principal, NamePrincipal::new );
copyProperty( props, AvailableSettings.PASS, cf::credential, SimplePassword::new );

View File

@ -72,7 +72,8 @@ public class AgroalConnectionProviderTest extends BaseCoreFunctionalTestCase {
}
catch (Exception e) {
// expected
assertTrue( e.getMessage().contains( "closed" ) );
assertTrue( e.getMessage() + " does not contain 'closed' or 'shutting down'",
e.getMessage().contains( "closed" ) || e.getMessage().contains( "shutting down" ) );
}
}
}

View File

@ -42,12 +42,6 @@ public class AgroalSkipAutoCommitTest extends BaseCoreFunctionalTestCase {
configuration.getProperties().put( AvailableSettings.AUTOCOMMIT, Boolean.FALSE.toString() );
}
@Override
public void releaseSessionFactory() {
super.releaseSessionFactory();
connectionProvider.stop();
}
@Override
protected Class<?>[] getAnnotatedClasses() {
return new Class<?>[]{ City.class };