1 package org.wamblee.support.persistence;
3 import static junit.framework.Assert.*;
5 import javax.sql.DataSource;
7 import org.junit.After;
8 import org.junit.Before;
11 public class DatabaseUtilsLeakTest {
14 private DatabaseUtils dbutils;
18 db = DatabaseBuilder.getDatabase();
19 DataSource ds = db.start();
21 dbutils = new DatabaseUtils(ds);
25 public void tearDown() {
30 public void testLeak() throws Exception {
31 assertEquals(0, db.getActiveConnections());
32 dbutils.dropTables(new MyTables());
33 assertEquals(0, db.getActiveConnections());