1 package org.wamblee.support.persistence;
3 import javax.sql.DataSource;
5 import org.dbunit.dataset.DataSetException;
6 import org.dbunit.dataset.filter.ITableFilterSimple;
7 import org.junit.After;
8 import org.junit.Before;
11 import static junit.framework.TestCase.*;
13 public class DatabaseUtilsLeakTest {
16 private DatabaseUtils dbutils;
20 db = DatabaseBuilder.getDatabase();
21 DataSource ds = db.start();
23 dbutils = new DatabaseUtils(ds, new ITableFilterSimple() {
25 public boolean accept(String aTableName) throws DataSetException {
32 public void tearDown() {
37 public void testLeak() throws Exception {
38 assertEquals(0, db.getActiveConnections());
40 assertEquals(0, db.getActiveConnections());