cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject cayenne git commit: vain attempt to improve 3.1 tests stability
Date Sat, 09 Apr 2016 09:49:17 GMT
Repository: cayenne
Updated Branches:
  refs/heads/STABLE-3.1 873d603e6 -> 9df5e1c01


vain attempt to improve 3.1 tests stability


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

Branch: refs/heads/STABLE-3.1
Commit: 9df5e1c011ee82daca2277c5b47529940763d77a
Parents: 873d603
Author: aadamchik <aadamchik@apache.org>
Authored: Sat Apr 9 12:09:39 2016 +0300
Committer: aadamchik <aadamchik@apache.org>
Committed: Sat Apr 9 12:47:16 2016 +0300

----------------------------------------------------------------------
 .../org/apache/cayenne/CDOOneToManyFKTest.java  |  2 +-
 .../java/org/apache/cayenne/CayenneTest.java    | 47 +++++++++++---------
 .../cayenne/access/DataContextClobTest.java     |  1 +
 .../access/DataContextEJBQLDeleteTest.java      | 41 +++++++++--------
 .../access/DataContextOuterJoinsTest.java       | 14 +++---
 .../query/ClientSelectQueryExpressionTest.java  | 11 ++---
 6 files changed, 63 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/9df5e1c0/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CDOOneToManyFKTest.java
----------------------------------------------------------------------
diff --git a/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CDOOneToManyFKTest.java
b/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CDOOneToManyFKTest.java
index a3bed72..fe19b49 100644
--- a/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CDOOneToManyFKTest.java
+++ b/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CDOOneToManyFKTest.java
@@ -41,8 +41,8 @@ public class CDOOneToManyFKTest extends ServerCase {
 
     @Override
     protected void setUpAfterInjection() throws Exception {
+    	dbHelper.deleteAll("TO_ONEFK1");
         dbHelper.deleteAll("TO_ONEFK2");
-        dbHelper.deleteAll("TO_ONEFK1");
     }
 
     public void testReadRelationship() throws Exception {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/9df5e1c0/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneTest.java
----------------------------------------------------------------------
diff --git a/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneTest.java
b/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneTest.java
index 12c66ee..6aab6d8 100644
--- a/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneTest.java
+++ b/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneTest.java
@@ -58,27 +58,32 @@ public class CayenneTest extends ServerCase {
     protected TableHelper tCharPKTest;
 
     @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-        dbHelper.deleteAll("COMPOUND_PK_TEST");
-        dbHelper.deleteAll("CHAR_PK_TEST");
-
-        tArtist = new TableHelper(dbHelper, "ARTIST");
-        tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
-
-        tPainting = new TableHelper(dbHelper, "PAINTING");
-        tPainting.setColumns("PAINTING_ID", "ARTIST_ID", "PAINTING_TITLE");
-
-        tCompoundPKTest = new TableHelper(dbHelper, "COMPOUND_PK_TEST");
-        tCompoundPKTest.setColumns("KEY1", "KEY2", "NAME");
-
-        tCharPKTest = new TableHelper(dbHelper, "CHAR_PK_TEST");
-        tCharPKTest.setColumns("PK_COL", "OTHER_COL");
-    }
+	protected void setUpAfterInjection() throws Exception {
+		dbHelper.deleteAll("PAINTING_INFO");
+		dbHelper.deleteAll("PAINTING");
+		dbHelper.deleteAll("ARTIST_EXHIBIT");
+		dbHelper.deleteAll("ARTIST_GROUP");
+		dbHelper.deleteAll("ARTIST");
+		dbHelper.deleteAll("ARTGROUP");
+		dbHelper.deleteAll("EXHIBIT");
+		dbHelper.deleteAll("GALLERY");
+
+		dbHelper.deleteAll("COMPOUND_FK_TEST");
+		dbHelper.deleteAll("COMPOUND_PK_TEST");
+		dbHelper.deleteAll("CHAR_PK_TEST");
+
+		tArtist = new TableHelper(dbHelper, "ARTIST");
+		tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
+
+		tPainting = new TableHelper(dbHelper, "PAINTING");
+		tPainting.setColumns("PAINTING_ID", "ARTIST_ID", "PAINTING_TITLE");
+
+		tCompoundPKTest = new TableHelper(dbHelper, "COMPOUND_PK_TEST");
+		tCompoundPKTest.setColumns("KEY1", "KEY2", "NAME");
+
+		tCharPKTest = new TableHelper(dbHelper, "CHAR_PK_TEST");
+		tCharPKTest.setColumns("PK_COL", "OTHER_COL");
+	}
 
     private void createOneCompoundPK() throws Exception {
         tCompoundPKTest.insert("PK1", "PK2", "BBB");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/9df5e1c0/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextClobTest.java
----------------------------------------------------------------------
diff --git a/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextClobTest.java
b/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextClobTest.java
index 1d31ea3..e846ac5 100644
--- a/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextClobTest.java
+++ b/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextClobTest.java
@@ -50,6 +50,7 @@ public class DataContextClobTest extends ServerCase {
     @Override
     protected void setUpAfterInjection() throws Exception {
         if (accessStackAdapter.supportsLobs()) {
+        	dbHelper.deleteAll("CLOB_TEST_RELATION");
             dbHelper.deleteAll("CLOB_TEST");
         }
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/9df5e1c0/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeleteTest.java
----------------------------------------------------------------------
diff --git a/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeleteTest.java
b/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeleteTest.java
index dbdfea7..cf40857 100644
--- a/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeleteTest.java
+++ b/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeleteTest.java
@@ -50,27 +50,26 @@ public class DataContextEJBQLDeleteTest extends ServerCase {
     protected TableHelper tMeaningfulPKTest1Table;
 
     @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-
-        tPainting = new TableHelper(dbHelper, "PAINTING");
-        tPainting.setColumns(
-                "PAINTING_ID",
-                "ARTIST_ID",
-                "PAINTING_TITLE",
-                "ESTIMATED_PRICE").setColumnTypes(
-                Types.INTEGER,
-                Types.BIGINT,
-                Types.VARCHAR,
-                Types.DECIMAL);
-
-        tMeaningfulPKTest1Table = new TableHelper(dbHelper, "MEANINGFUL_PK_TEST1");
-        tMeaningfulPKTest1Table.setColumns("PK_ATTRIBUTE", "DESCR");
-    }
+	protected void setUpAfterInjection() throws Exception {
+		dbHelper.deleteAll("PAINTING_INFO");
+		dbHelper.deleteAll("PAINTING");
+		dbHelper.deleteAll("ARTIST_EXHIBIT");
+		dbHelper.deleteAll("ARTIST_GROUP");
+		dbHelper.deleteAll("ARTIST");
+		dbHelper.deleteAll("ARTGROUP");
+		dbHelper.deleteAll("EXHIBIT");
+		dbHelper.deleteAll("GALLERY");
+
+		dbHelper.deleteAll("MEANINGFUL_PK_DEP");
+		dbHelper.deleteAll("MEANINGFUL_PK_TEST1");
+
+		tPainting = new TableHelper(dbHelper, "PAINTING");
+		tPainting.setColumns("PAINTING_ID", "ARTIST_ID", "PAINTING_TITLE", "ESTIMATED_PRICE")
+				.setColumnTypes(Types.INTEGER, Types.BIGINT, Types.VARCHAR, Types.DECIMAL);
+
+		tMeaningfulPKTest1Table = new TableHelper(dbHelper, "MEANINGFUL_PK_TEST1");
+		tMeaningfulPKTest1Table.setColumns("PK_ATTRIBUTE", "DESCR");
+	}
 
     protected void createPaintingsDataSet() throws Exception {
         tPainting.insert(33001, null, "P1", 3000);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/9df5e1c0/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOuterJoinsTest.java
----------------------------------------------------------------------
diff --git a/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOuterJoinsTest.java
b/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOuterJoinsTest.java
index f00d4fe..97ba644 100644
--- a/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOuterJoinsTest.java
+++ b/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextOuterJoinsTest.java
@@ -69,11 +69,15 @@ public class DataContextOuterJoinsTest extends ServerCase {
                 "ARTIST_GROUP",
                 "GROUP_ID",
                 "ARTIST_ID");
-
-        artistGroupHelper.deleteAll();
-        artgroupHelper.deleteAll();
-        paintingHelper.deleteAll();
-        artistHelper.deleteAll();
+        
+        dbHelper.deleteAll("PAINTING_INFO");
+        dbHelper.deleteAll("PAINTING");
+        dbHelper.deleteAll("ARTIST_EXHIBIT");
+        dbHelper.deleteAll("ARTIST_GROUP");
+        dbHelper.deleteAll("ARTIST");
+        dbHelper.deleteAll("ARTGROUP");
+        dbHelper.deleteAll("EXHIBIT");
+        dbHelper.deleteAll("GALLERY");
     }
 
     public void testSelectWithOuterJoinFlattened() throws Exception {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/9df5e1c0/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/ClientSelectQueryExpressionTest.java
----------------------------------------------------------------------
diff --git a/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/ClientSelectQueryExpressionTest.java
b/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/ClientSelectQueryExpressionTest.java
index 90b8c5f..5be4be2 100644
--- a/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/ClientSelectQueryExpressionTest.java
+++ b/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/query/ClientSelectQueryExpressionTest.java
@@ -42,12 +42,13 @@ public class ClientSelectQueryExpressionTest extends ClientCase {
     private TableHelper tMtTable1;
 
     @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE1");
+	protected void setUpAfterInjection() throws Exception {
+		dbHelper.deleteAll("MT_TABLE2");
+		dbHelper.deleteAll("MT_TABLE1");
 
-        tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
-        tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
-    }
+		tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
+		tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
+	}
 
     protected void createMtTable1DataSet() throws Exception {
         for (int i = 1; i <= 20; i++) {


Mime
View raw message