protected void tearDown() throws Exception { // System.err.println("++++++ TESTS END (" + getName() + ") ++++++"); TimeZone.setDefault(saveTZ); TestUtil.dropTable(con, "testtimezone"); TestUtil.closeDB(con); }
/** * Ensure the cancel call does not return before it has completed. Previously it did which * cancelled future queries. */ public void testSingleThreadCancel() throws Exception { Connection con = TestUtil.openDB(); Statement stmt = con.createStatement(); for (int i = 0; i < 100; i++) { ResultSet rs = stmt.executeQuery("SELECT 1"); rs.close(); stmt.cancel(); } TestUtil.closeDB(con); }
/* * (non-Javadoc) * * @see junit.framework.TestCase#tearDown() */ protected void tearDown() throws Exception { Statement stmt = con.createStatement(); stmt.execute("drop function Numeric_Proc(out decimal, out decimal, out decimal)"); stmt.execute("drop function test_somein_someout(int4)"); stmt.execute("drop function test_allinout( inout int4, inout varchar, inout int8)"); stmt.execute("drop function mysum(a int, b int)"); stmt.execute("drop function myiofunc(a INOUT int, b OUT int) "); stmt.execute("drop function myif(a INOUT int, b IN int)"); stmt.close(); TestUtil.closeDB(con); }
/* * Some versions of the driver would return rs as a null? * * Sasha <*****@*****.**> was having this problem. * * Added Feb 13 2001 */ public void testDatabaseSelectNullBug() throws Exception { Connection con = TestUtil.openDB(); Statement st = con.createStatement(); ResultSet rs = st.executeQuery("select datname from pg_database"); assertNotNull(rs); while (rs.next()) { rs.getString(1); } rs.close(); st.close(); TestUtil.closeDB(con); }
protected void tearDown() throws SQLException { Statement stmt = _conn.createStatement(); stmt.execute("DROP TABLE hold"); stmt.close(); TestUtil.closeDB(_conn); }