db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an...@apache.org
Subject svn commit: r894049 - /db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/api/QueryTimeout.java
Date Sun, 27 Dec 2009 09:26:47 GMT
Author: andyj
Date: Sun Dec 27 09:26:46 2009
New Revision: 894049

URL: http://svn.apache.org/viewvc?rev=894049&view=rev
Log:
fix compile against current api2 for timeout changes

Modified:
    db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/api/QueryTimeout.java

Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/api/QueryTimeout.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/api/QueryTimeout.java?rev=894049&r1=894048&r2=894049&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/api/QueryTimeout.java (original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/query/api/QueryTimeout.java Sun Dec 27 09:26:46
2009
@@ -17,10 +17,10 @@
 
 package org.apache.jdo.tck.query.api;
 
-import javax.jdo.JDOQueryTimeoutException;
 import javax.jdo.PersistenceManager;
 import javax.jdo.Query;
 import javax.jdo.Transaction;
+import javax.jdo.JDODataStoreException;
 
 import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.mylib.PCPoint;
@@ -78,14 +78,14 @@
         try {
             tx.begin();
             Query query = pm.newQuery(SSJDOQL);
-            query.setTimeoutMillis(TIMEOUT_MILLIS);
+            query.setDatastoreReadTimeoutMillis(TIMEOUT_MILLIS);
             Object result = query.execute();
             tx.commit();
             tx = null;
             fail(ASSERTION_FAILED,
                  "Query.execute should result in a JDOQueryTimeoutException.");
         }
-        catch (JDOQueryTimeoutException ex) {
+        catch (JDODataStoreException ex) {
             // expected exception
             if (debug) {
                 logger.debug("caught expected exception " + ex);
@@ -105,12 +105,12 @@
         try {
             tx.begin();
             Query query = pm.newQuery(SSJDOQL);
-            query.setTimeoutMillis(0);
+            query.setDatastoreReadTimeoutMillis(0);
             Object result = query.execute();
             tx.commit();
             tx = null;
         }
-        catch (JDOQueryTimeoutException ex) {
+        catch (JDODataStoreException ex) {
             // setting the timeout to 0 should not result in an exception
             fail(ASSERTION_FAILED,
                  "Query.execute should not result in a JDOQueryTimeoutException.");



Mime
View raw message