cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [2/2] cayenne git commit: must cleanup the DB before run
Date Sat, 07 Jan 2017 15:37:46 GMT
must cleanup the DB before run


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/80d0287a
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/80d0287a
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/80d0287a

Branch: refs/heads/master
Commit: 80d0287af6116dd699153df2e5171b43d71f1c26
Parents: 8102c7c
Author: Andrus Adamchik <andrus@objectstyle.com>
Authored: Sat Jan 7 18:37:29 2017 +0300
Committer: Andrus Adamchik <andrus@objectstyle.com>
Committed: Sat Jan 7 18:37:29 2017 +0300

----------------------------------------------------------------------
 .../test/java/org/apache/cayenne/java8/Java8TimeIT.java  | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/80d0287a/cayenne-java8/src/test/java/org/apache/cayenne/java8/Java8TimeIT.java
----------------------------------------------------------------------
diff --git a/cayenne-java8/src/test/java/org/apache/cayenne/java8/Java8TimeIT.java b/cayenne-java8/src/test/java/org/apache/cayenne/java8/Java8TimeIT.java
index e837044..fb1a794 100644
--- a/cayenne-java8/src/test/java/org/apache/cayenne/java8/Java8TimeIT.java
+++ b/cayenne-java8/src/test/java/org/apache/cayenne/java8/Java8TimeIT.java
@@ -24,9 +24,12 @@ import org.apache.cayenne.java8.db.LocalDateTestEntity;
 import org.apache.cayenne.java8.db.LocalDateTimeTestEntity;
 import org.apache.cayenne.java8.db.LocalTimeTestEntity;
 import org.apache.cayenne.query.ObjectSelect;
+import org.apache.cayenne.test.jdbc.DBHelper;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.Test;
 
+import java.sql.SQLException;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
@@ -36,6 +39,14 @@ import static org.junit.Assert.assertNotNull;
 
 public class Java8TimeIT extends RuntimeBase {
 
+	@Before
+	public void before() throws SQLException {
+		DBHelper dbHelper = new DBHelper(runtime.getDataSource());
+		dbHelper.deleteAll("LOCAL_DATE_TEST");
+		dbHelper.deleteAll("LOCAL_DATETIME_TEST");
+		dbHelper.deleteAll("LOCAL_TIME_TEST");
+	}
+
 	@Test
 	public void testJava8LocalDate_Null() {
 		ObjectContext context = runtime.newContext();


Mime
View raw message