Changeset: 32e7ac7b979e for monetdb-java
URL: https://dev.monetdb.org/hg/monetdb-java/rev/32e7ac7b979e
Modified Files:
tests/ConnectionTests.java
Branch: default
Log Message:
Tests should always cleanup their created objects, so added cleanup() method.
diffs (26 lines):
diff --git a/tests/ConnectionTests.java b/tests/ConnectionTests.java
--- a/tests/ConnectionTests.java
+++ b/tests/ConnectionTests.java
@@ -77,6 +77,8 @@ public class ConnectionTests {
tester.withProp("autocommit", "false").checkAutoCommit(false);
tester.testTimeZone();
+
+ tester.cleanup();
}
Connection connect() throws SQLException {
@@ -159,6 +161,13 @@ public class ConnectionTests {
}
}
+ private void cleanup() throws SQLException {
+ try (Connection conn = connect(); Statement stmt =
conn.createStatement()) {
+ stmt.execute("DROP TABLE IF EXISTS connectiontests");
+ stmt.execute("DROP TABLE IF EXISTS connectiontests_ts");
+ }
+ }
+
public class Failure extends Exception {
private static final long serialVersionUID = 1L;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]