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

@ -126,15 +126,15 @@ ext {
// EL required by Hibernate Validator at test runtime
expression_language: "org.glassfish:javax.el:${elVersion}",
c3p0: "com.mchange:c3p0:0.9.5.2",
c3p0: "com.mchange:c3p0:0.9.5.2",
ehcache: "net.sf.ehcache:ehcache:2.10.3",
ehcache3: "org.ehcache:ehcache:3.0.0",
jcache: "javax.cache:cache-api:1.0.0",
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 };