@Test public void bitronixDataSourcePoolConfiguration() { this.context = new AnnotationConfigApplicationContext(); EnvironmentTestUtils.addEnvironment(this.context, "spring.jta.bitronix.datasource.minPoolSize:5", "spring.jta.bitronix.datasource.maxPoolSize:10"); this.context.register(JtaPropertiesConfiguration.class, BitronixJtaConfiguration.class, PoolConfiguration.class); this.context.refresh(); PoolingDataSourceBean dataSource = this.context .getBean(PoolingDataSourceBean.class); assertThat(dataSource.getMinPoolSize()).isEqualTo(5); assertThat(dataSource.getMaxPoolSize()).isEqualTo(10); }
@Test public void bitronixDataSourcePoolConfiguration() { this.context = new AnnotationConfigApplicationContext(); EnvironmentTestUtils.addEnvironment(this.context, "spring.jta.bitronix.datasource.minPoolSize:5", "spring.jta.bitronix.datasource.maxPoolSize:10"); this.context.register(JtaPropertiesConfiguration.class, BitronixJtaConfiguration.class, PoolConfiguration.class); this.context.refresh(); PoolingDataSourceBean dataSource = this.context .getBean(PoolingDataSourceBean.class); assertThat(dataSource.getMinPoolSize(), is(equalTo(5))); assertThat(dataSource.getMaxPoolSize(), is(equalTo(10))); }