cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1566066 - /cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataContextMaxIdQualifierTest.java
Date Sat, 08 Feb 2014 17:47:44 GMT
Author: aadamchik
Date: Sat Feb  8 17:47:43 2014
New Revision: 1566066

URL: http://svn.apache.org/r1566066
Log:
reducing the test set size 10x for speed

Modified:
    cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataContextMaxIdQualifierTest.java

Modified: cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataContextMaxIdQualifierTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataContextMaxIdQualifierTest.java?rev=1566066&r1=1566065&r2=1566066&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataContextMaxIdQualifierTest.java
(original)
+++ cayenne/main/branches/STABLE-3.1/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataContextMaxIdQualifierTest.java
Sat Feb  8 17:47:43 2014
@@ -73,23 +73,23 @@ public class DataContextMaxIdQualifierTe
 
     private void insertData() throws SQLException {
         
-        for (int i = 1; i <= 1000; i++) {
+        for (int i = 1; i <= 100; i++) {
             tArtist.insert(i, "AA" + i);
             tPainting.insert(i, i, "P" + i);
         }
     }
 
-    private void insertData_OneBag_1000Boxes() throws SQLException {
+    private void insertData_OneBag_100Boxes() throws SQLException {
         tArtist.insert(1, "AA1");
 
-        for (int i = 1; i <= 1000; i++) {
+        for (int i = 1; i <= 100; i++) {
             tPainting.insert(i, 1, "P" + i);
         }
     }
 
     public void testDisjointByIdPrefetch() throws Exception {
         insertData();
-        runtime.getDataDomain().setMaxIdQualifierSize(100);
+        runtime.getDataDomain().setMaxIdQualifierSize(10);
         
         final SelectQuery query = new SelectQuery(Artist.class);
         query.addPrefetch(Artist.PAINTING_ARRAY_PROPERTY).setSemantics(PrefetchTreeNode.DISJOINT_BY_ID_PREFETCH_SEMANTICS);
@@ -139,12 +139,12 @@ public class DataContextMaxIdQualifierTe
     }
 
     public void testIncrementalFaultList_Lower() throws Exception {
-        insertData_OneBag_1000Boxes();
+        insertData_OneBag_100Boxes();
 
-        runtime.getDataDomain().setMaxIdQualifierSize(50);
+        runtime.getDataDomain().setMaxIdQualifierSize(5);
 
         final SelectQuery query = new SelectQuery(Painting.class);
-        query.setPageSize(100);
+        query.setPageSize(10);
         int queriesCount = queryInterceptor.runWithQueryCounter(new UnitTestClosure() {
 
             public void execute() {
@@ -170,12 +170,12 @@ public class DataContextMaxIdQualifierTe
     }
     
     public void testIncrementalFaultList_Higher() throws Exception {
-        insertData_OneBag_1000Boxes();
+        insertData_OneBag_100Boxes();
 
-        runtime.getDataDomain().setMaxIdQualifierSize(1001);
+        runtime.getDataDomain().setMaxIdQualifierSize(101);
 
         final SelectQuery query = new SelectQuery(Painting.class);
-        query.setPageSize(100);
+        query.setPageSize(10);
         int queriesCount = queryInterceptor.runWithQueryCounter(new UnitTestClosure() {
 
             public void execute() {
@@ -201,12 +201,12 @@ public class DataContextMaxIdQualifierTe
     }
 
     public void testIncrementalFaultList_Zero() throws Exception {
-        insertData_OneBag_1000Boxes();
+        insertData_OneBag_100Boxes();
 
         runtime.getDataDomain().setMaxIdQualifierSize(0);
 
         final SelectQuery query = new SelectQuery(Painting.class);
-        query.setPageSize(100);
+        query.setPageSize(10);
         int queriesCount = queryInterceptor.runWithQueryCounter(new UnitTestClosure() {
 
             public void execute() {
@@ -220,12 +220,12 @@ public class DataContextMaxIdQualifierTe
     }
 
     public void testIncrementalFaultList_Negative() throws Exception {
-        insertData_OneBag_1000Boxes();
+        insertData_OneBag_100Boxes();
 
         runtime.getDataDomain().setMaxIdQualifierSize(-1);
 
         final SelectQuery query = new SelectQuery(Painting.class);
-        query.setPageSize(100);
+        query.setPageSize(10);
         int queriesCount = queryInterceptor.runWithQueryCounter(new UnitTestClosure() {
 
             public void execute() {



Mime
View raw message