HHH-5942 - Migrate to JUnit 4
This commit is contained in:
parent
1c203f35ec
commit
ed882f68ae
|
@ -22,19 +22,29 @@
|
||||||
* Boston, MA 02110-1301 USA
|
* Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
package org.hibernate.service.jdbc.connections.internal;
|
package org.hibernate.service.jdbc.connections.internal;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import junit.framework.TestCase;
|
|
||||||
import org.hibernate.cfg.Environment;
|
|
||||||
import org.logicalcobwebs.proxool.ProxoolFacade;
|
import org.logicalcobwebs.proxool.ProxoolFacade;
|
||||||
|
|
||||||
|
import org.hibernate.cfg.Environment;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import org.hibernate.testing.junit4.BaseUnitTestCase;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test to verify connection pools are closed, and that only the managed one is closed.
|
* Test to verify connection pools are closed, and that only the managed one is closed.
|
||||||
|
*
|
||||||
* @author Sanne Grinovero
|
* @author Sanne Grinovero
|
||||||
*/
|
*/
|
||||||
public class ProxoolConnectionProviderTest extends TestCase {
|
public class ProxoolConnectionProviderTest extends BaseUnitTestCase {
|
||||||
|
@Test
|
||||||
public void testPoolsClosed() {
|
public void testPoolsClosed() {
|
||||||
assertDefinedPools(); // zero-length-vararg used as parameter
|
assertDefinedPools(); // zero-length-vararg used as parameter
|
||||||
|
|
||||||
|
@ -61,10 +71,6 @@ public class ProxoolConnectionProviderTest extends TestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param pool name
|
|
||||||
* @return his configuration - see src/tests/resources for matches
|
|
||||||
*/
|
|
||||||
private Properties getPoolConfigurarion(String poolName) {
|
private Properties getPoolConfigurarion(String poolName) {
|
||||||
Properties cfg = new Properties();
|
Properties cfg = new Properties();
|
||||||
cfg.setProperty( Environment.PROXOOL_POOL_ALIAS, poolName );
|
cfg.setProperty( Environment.PROXOOL_POOL_ALIAS, poolName );
|
||||||
|
|
Loading…
Reference in New Issue