cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1334371 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/access/ main/java/org/apache/cayenne/configuration/ main/java/org/apache/cayenne/configuration/server/ test/java/org/apache/cayenne/ te...
Date Sat, 05 May 2012 10:01:17 GMT
Author: aadamchik
Date: Sat May  5 10:01:16 2012
New Revision: 1334371

URL: http://svn.apache.org/viewvc?rev=1334371&view=rev
Log:
CAY-1700 Split long DISJOINT_BY_ID prefetch query on several smaller queries

patch by Andrei Veprev

Added:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataContextMaxIdQualifierTest.java
Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContextQueryAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolver.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/IncrementalFaultList.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/SimpleIdIncrementalFaultList.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Constants.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java?rev=1334371&r1=1334370&r2=1334371&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
Sat May  5 10:01:16 2012
@@ -44,6 +44,7 @@ import org.apache.cayenne.QueryResponse;
 import org.apache.cayenne.access.util.IteratedSelectObserver;
 import org.apache.cayenne.cache.NestedQueryCache;
 import org.apache.cayenne.configuration.CayenneRuntime;
+import org.apache.cayenne.configuration.RuntimeProperties;
 import org.apache.cayenne.event.EventManager;
 import org.apache.cayenne.graph.ChildDiffLoader;
 import org.apache.cayenne.graph.CompoundDiff;
@@ -202,6 +203,15 @@ public class DataContext extends BaseCon
     }
 
     /**
+     * Returns runtime properties fetched from parent data domain.
+     *
+     * @since 3.1
+     */
+    public RuntimeProperties getRuntimeProperties() {
+        return getParentDataDomain().getRuntimeProperties();
+    }
+
+    /**
      * Sets a DataContextDelegate for this context. Delegate is notified of certain events
      * in the DataContext lifecycle and can customize DataContext behavior.
      * 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContextQueryAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContextQueryAction.java?rev=1334371&r1=1334370&r2=1334371&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContextQueryAction.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContextQueryAction.java
Sat May  5 10:01:16 2012
@@ -27,6 +27,7 @@ import java.util.Map;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.PersistenceState;
 import org.apache.cayenne.Persistent;
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.query.ObjectIdQuery;
 import org.apache.cayenne.query.Query;
@@ -107,12 +108,17 @@ class DataContextQueryAction extends Obj
         if (metadata.getPageSize() > 0) {
 
             DbEntity dbEntity = metadata.getDbEntity();
-            List<?> paginatedList = dbEntity != null
-                    && dbEntity.getPrimaryKeys().size() == 1
-                    ? new SimpleIdIncrementalFaultList<Object>(
-                            (DataContext) actingContext,
-                            query)
-                    : new IncrementalFaultList<Object>((DataContext) actingContext,
query);
+            Integer maxIdQualifierSize = actingDataContext
+                    .getRuntimeProperties().getInt(Constants.SERVER_MAX_ID_QUALIFIER_SIZE_PROPERTY,
-1);
+            List<?> paginatedList;
+            if (dbEntity != null && dbEntity.getPrimaryKeys().size() == 1) {
+                paginatedList = new SimpleIdIncrementalFaultList<Object>(
+                        (DataContext) actingContext, query, maxIdQualifierSize);
+            }
+            else {
+                paginatedList = new IncrementalFaultList<Object>(
+                        (DataContext) actingContext, query, maxIdQualifierSize);
+            }
 
             response = new ListResponse(paginatedList);
             return DONE;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java?rev=1334371&r1=1334370&r2=1334371&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
Sat May  5 10:01:16 2012
@@ -38,7 +38,9 @@ import org.apache.cayenne.QueryResponse;
 import org.apache.cayenne.access.jdbc.BatchQueryBuilderFactory;
 import org.apache.cayenne.cache.NestedQueryCache;
 import org.apache.cayenne.cache.QueryCache;
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.ObjectContextFactory;
+import org.apache.cayenne.configuration.RuntimeProperties;
 import org.apache.cayenne.di.BeforeScopeEnd;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.event.EventManager;
@@ -76,6 +78,9 @@ public class DataDomain implements Query
     @Inject
     protected JdbcEventLogger jdbcEventLogger;
 
+    @Inject
+    protected RuntimeProperties runtimeProperties;
+
     /**
      * @since 3.1
      */
@@ -937,6 +942,15 @@ public class DataDomain implements Query
         return jdbcEventLogger;
     }
 
+    /**
+     * Returns global runtime properties for this data domain.
+     *
+     * @since 3.1
+     */
+    public RuntimeProperties getRuntimeProperties() {
+        return runtimeProperties;
+    }
+
     void refreshEntitySorter() {
         if (entitySorter != null) {
             entitySorter.setEntityResolver(getEntityResolver());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolver.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolver.java?rev=1334371&r1=1334370&r2=1334371&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolver.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/HierarchicalObjectResolver.java
Sat May  5 10:01:16 2012
@@ -19,6 +19,7 @@
 
 package org.apache.cayenne.access;
 
+import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
@@ -28,6 +29,7 @@ import java.util.Set;
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.Persistent;
+import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.exp.Expression;
 import org.apache.cayenne.exp.ExpressionFactory;
 import org.apache.cayenne.map.DbJoin;
@@ -136,10 +138,6 @@ class HierarchicalObjectResolver {
                     .getParent();
             ObjRelationship relationship = processorNode.getIncoming().getRelationship();
 
-            PrefetchSelectQuery query = new PrefetchSelectQuery(
-                    node.getPath(),
-                    relationship);
-
             List<DbRelationship> dbRelationships = relationship.getDbRelationships();
             DbRelationship lastDbRelationship = dbRelationships.get(0);
 
@@ -170,10 +168,26 @@ class HierarchicalObjectResolver {
                 parentDataRows = parentProcessorNode.getDataRows();
             }
 
-            for (Object dataRow : parentDataRows) {
+            int maxIdQualifierSize = context.getRuntimeProperties()
+                    .getInt(Constants.SERVER_MAX_ID_QUALIFIER_SIZE_PROPERTY, -1);
+
+            List<PrefetchSelectQuery> queries = new ArrayList<PrefetchSelectQuery>();
+            int qualifiersCount = 0;
+            PrefetchSelectQuery currentQuery = null;
 
+            for (Object dataRow : parentDataRows) {
                 Expression allJoinsQualifier = null;
-                for (DbJoin join : lastDbRelationship.getJoins()) {
+                List<DbJoin> joins = lastDbRelationship.getJoins();
+
+                // handling too big qualifiers
+                if (currentQuery == null
+                        || (maxIdQualifierSize > 0 && qualifiersCount + joins.size()
> maxIdQualifierSize)) {
+                    currentQuery = new PrefetchSelectQuery(node.getPath(), relationship);
+                    queries.add(currentQuery);
+                    qualifiersCount = 0;
+                }
+
+                for (DbJoin join : joins) {
 
                     Object targetValue = ((DataRow) dataRow).get(join.getSourceName());
                     Expression joinQualifier = ExpressionFactory.matchDbExp(pathPrefix
@@ -186,23 +200,27 @@ class HierarchicalObjectResolver {
                     }
                 }
 
-                query.orQualifier(allJoinsQualifier);
+                currentQuery.orQualifier(allJoinsQualifier);
+                qualifiersCount += joins.size();
             }
 
-            // need to pass the remaining tree to make joint prefetches work
             PrefetchTreeNode jointSubtree = node.cloneJointSubtree();
-            if (jointSubtree.hasChildren()) {
-                query.setPrefetchTree(jointSubtree);
-            }
 
-            query.setFetchingDataRows(true);
-            if (relationship.isSourceIndependentFromTargetChange()) {
-                // setup extra result columns to be able to relate result rows to the
-                // parent result objects.
-                query.addResultPath("db:" + relationship.getReverseDbRelationshipPath());
-            }
+            List dataRows = new ArrayList();
+            for (PrefetchSelectQuery query : queries) {
+                // need to pass the remaining tree to make joint prefetches work
+                if (jointSubtree.hasChildren()) {
+                    query.setPrefetchTree(jointSubtree);
+                }
 
-            List dataRows = context.performQuery(query);
+                query.setFetchingDataRows(true);
+                if (relationship.isSourceIndependentFromTargetChange()) {
+                    // setup extra result columns to be able to relate result rows to the
+                    // parent result objects.
+                    query.addResultPath("db:" + relationship.getReverseDbRelationshipPath());
+                }
+                dataRows.addAll(context.performQuery(query));
+            }
             processorNode.setDataRows(dataRows);
 
             return startDisjointPrefetch(node);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/IncrementalFaultList.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/IncrementalFaultList.java?rev=1334371&r1=1334370&r2=1334371&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/IncrementalFaultList.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/IncrementalFaultList.java
Sat May  5 10:01:16 2012
@@ -76,7 +76,7 @@ public class IncrementalFaultList<E> imp
      * Defines the upper limit on the size of fetches. This is needed to avoid where
      * clause size limitations.
      */
-    protected int maxFetchSize = 10000;
+    protected int maxFetchSize;
 
     // Don't confuse this with the JDBC ResultSet fetch size setting - this controls
     // the where clause generation that is necessary to fetch specific records a page
@@ -91,8 +91,9 @@ public class IncrementalFaultList<E> imp
      *            objects.
      * @param query Main query used to retrieve data. Must have "pageSize" property set to
      *            a value greater than zero.
+     * @param maxFetchSize maximum number of fetches in one query
      */
-    public IncrementalFaultList(DataContext dataContext, Query query) {
+    public IncrementalFaultList(DataContext dataContext, Query query, int maxFetchSize) {
         QueryMetadata metadata = query.getMetaData(dataContext.getEntityResolver());
         if (metadata.getPageSize() <= 0) {
             throw new CayenneRuntimeException("Not a paginated query; page size: "
@@ -121,6 +122,8 @@ public class IncrementalFaultList<E> imp
         List<Object> elementsUnsynced = new ArrayList<Object>();
         fillIn(query, elementsUnsynced);
         this.elements = Collections.synchronizedList(elementsUnsynced);
+
+        this.maxFetchSize = maxFetchSize;
     }
 
     /**

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/SimpleIdIncrementalFaultList.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/SimpleIdIncrementalFaultList.java?rev=1334371&r1=1334370&r2=1334371&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/SimpleIdIncrementalFaultList.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/SimpleIdIncrementalFaultList.java
Sat May  5 10:01:16 2012
@@ -38,8 +38,8 @@ class SimpleIdIncrementalFaultList<E> ex
 
     protected DbAttribute pk;
 
-    SimpleIdIncrementalFaultList(DataContext dataContext, Query query) {
-        super(dataContext, query);
+    SimpleIdIncrementalFaultList(DataContext dataContext, Query query, int maxFetchSize)
{
+        super(dataContext, query, maxFetchSize);
 
         Collection<DbAttribute> pks = rootEntity.getDbEntity().getPrimaryKeys();
         if (pks.size() != 1) {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Constants.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Constants.java?rev=1334371&r1=1334370&r2=1334371&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Constants.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Constants.java
Sat May  5 10:01:16 2012
@@ -132,4 +132,11 @@ public interface Constants {
      */
     public static final String SERVER_ROP_EVENT_BRIDGE_FACTORY_PROPERTY = "cayenne.server.rop_event_bridge_factory";
 
+    /**
+     * A property that defines a maximum number of ID qualifiers in where clause of queries
+     * that are generated for example in {@link org.apache.cayenne.access.IncrementalFaultList}
+     * or in DISJOINT_BY_ID prefetch processing. This is needed to avoid where
+     * clause size limitations and memory usage efficiency.
+     */
+    public static final String SERVER_MAX_ID_QUALIFIER_SIZE_PROPERTY = "cayenne.server.max_id_qualifier_size";
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java?rev=1334371&r1=1334370&r2=1334371&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java
Sat May  5 10:01:16 2012
@@ -97,6 +97,8 @@ import org.apache.cayenne.resource.Resou
  */
 public class ServerModule implements Module {
 
+    private static final int DEFAULT_MAX_ID_QUALIFIER_SIZE = 10000;
+
     protected String[] configurationLocations;
 
     /**
@@ -118,8 +120,9 @@ public class ServerModule implements Mod
 
     public void configure(Binder binder) {
 
-        // configure empty global stack properties
-        binder.bindMap(Constants.PROPERTIES_MAP);
+        // configure global stack properties
+        binder.bindMap(Constants.PROPERTIES_MAP)
+            .put(Constants.SERVER_MAX_ID_QUALIFIER_SIZE_PROPERTY, String.valueOf(DEFAULT_MAX_ID_QUALIFIER_SIZE));
 
         binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class);
         

Added: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataContextMaxIdQualifierTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataContextMaxIdQualifierTest.java?rev=1334371&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataContextMaxIdQualifierTest.java
(added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/DataContextMaxIdQualifierTest.java
Sat May  5 10:01:16 2012
@@ -0,0 +1,91 @@
+package org.apache.cayenne;
+
+import org.apache.cayenne.access.DataContext;
+import org.apache.cayenne.configuration.Constants;
+import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.query.PrefetchTreeNode;
+import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.test.jdbc.DBHelper;
+import org.apache.cayenne.test.jdbc.TableHelper;
+import org.apache.cayenne.testdo.testmap.Bag;
+import org.apache.cayenne.testdo.testmap.Box;
+import org.apache.cayenne.unit.di.DataChannelInterceptor;
+import org.apache.cayenne.unit.di.UnitTestClosure;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class DataContextMaxIdQualifierTest extends ServerCase {
+    @Inject
+    protected DataContext context;
+
+    @Inject
+    protected DBHelper dbHelper;
+
+    @Inject
+    protected DataChannelInterceptor queryInterceptor;
+
+    protected TableHelper tBag;
+    protected TableHelper tBox;
+
+    static {
+        System.setProperty(Constants.SERVER_MAX_ID_QUALIFIER_SIZE_PROPERTY, "100");
+    }
+
+    @Override
+    protected void setUpAfterInjection() throws Exception {
+        dbHelper.deleteAll("BALL");
+        dbHelper.deleteAll("BOX_THING");
+        dbHelper.deleteAll("THING");
+        dbHelper.deleteAll("BOX_INFO");
+        dbHelper.deleteAll("BOX");
+        dbHelper.deleteAll("BAG");
+
+        tBag = new TableHelper(dbHelper, "BAG");
+        tBag.setColumns("ID", "NAME");
+
+        tBox = new TableHelper(dbHelper, "BOX");
+        tBox.setColumns("ID", "BAG_ID", "NAME");
+    }
+
+    public void testDisjointByIdPrefetch() throws Exception {
+        for (int i = 0; i < 1000; i++) {
+            tBag.insert(i + 1, "bag" + (i + 1));
+            tBox.insert(i + 1, i + 1, "box" + (i + 1));
+        }
+
+        final SelectQuery query = new SelectQuery(Bag.class);
+        query.addPrefetch(Bag.BOXES_PROPERTY)
+                .setSemantics(PrefetchTreeNode.DISJOINT_BY_ID_PREFETCH_SEMANTICS);
+
+        int queriesCount = queryInterceptor.runWithQueryCounter(new UnitTestClosure() {
+            public void execute() {
+                context.performQuery(query);
+            }
+        });
+
+        assertEquals(11, queriesCount);
+    }
+
+    public void testIncrementalFaultList() throws Exception {
+        tBag.insert(1, "bag1");
+        for (int i = 0; i < 1000; i++) {
+            tBox.insert(i + 1, 1, "box" + (i + 1));
+        }
+
+        final SelectQuery query = new SelectQuery(Box.class);
+        query.setPageSize(100);
+        int queriesCount = queryInterceptor.runWithQueryCounter(new UnitTestClosure() {
+            public void execute() {
+                final List<Box> boxes = context.performQuery(query);
+                List<Box> tempList = new ArrayList<Box>();
+                tempList.addAll(boxes);
+            }
+        });
+
+        assertEquals(11, queriesCount);
+    }
+}

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsTest.java?rev=1334371&r1=1334370&r2=1334371&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsTest.java
Sat May  5 10:01:16 2012
@@ -69,7 +69,7 @@ public class SimpleIdIncrementalFaultLis
         q.setFetchingDataRows(true);
         q.addOrdering("db:ARTIST_ID", SortOrder.ASCENDING);
 
-        list = new SimpleIdIncrementalFaultList<Object>(context, q);
+        list = new SimpleIdIncrementalFaultList<Object>(context, q, 10000);
     }
 
     protected void createArtistsDataSet() throws Exception {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListTest.java?rev=1334371&r1=1334370&r2=1334371&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListTest.java
Sat May  5 10:01:16 2012
@@ -96,7 +96,7 @@ public class SimpleIdIncrementalFaultLis
         query.setPageSize(10);
         SimpleIdIncrementalFaultList<Artist> list = new SimpleIdIncrementalFaultList<Artist>(
                 context,
-                query);
+                query, 10000);
 
         assertEquals(25, list.size());
 
@@ -117,7 +117,7 @@ public class SimpleIdIncrementalFaultLis
         // by the page size, to test the last smaller page
         query.setPageSize(pageSize);
         query.addOrdering("db:ARTIST_ID", SortOrder.ASCENDING);
-        return new SimpleIdIncrementalFaultList<Object>(context, query);
+        return new SimpleIdIncrementalFaultList<Object>(context, query, 10000);
     }
 
     public void testSize() throws Exception {
@@ -172,7 +172,7 @@ public class SimpleIdIncrementalFaultLis
 
         SimpleIdIncrementalFaultList<?> list = new SimpleIdIncrementalFaultList<Object>(
                 context,
-                q);
+                q, 10000);
 
         assertSame(newArtist, list.get(25));
     }



Mime
View raw message