jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r158911 - incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java
Date Thu, 24 Mar 2005 10:34:20 GMT
Author: mreutegg
Date: Thu Mar 24 02:34:19 2005
New Revision: 158911

URL: http://svn.apache.org/viewcvs?view=rev&rev=158911
Log:
JCR-80: AbstractQueryTest.evaluateResultOrder() should fail if workspace does not contain
enough content

Modified:
    incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java?view=diff&r1=158910&r2=158911
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java
Thu Mar 24 02:34:19 2005
@@ -210,7 +210,7 @@
             throws RepositoryException, NotExecutableException {
         RowIterator rows = queryResult.getRows();
         if (getSize(rows) < 2) {
-            throw new NotExecutableException("Can not test ordering on less than 2 results");
+            fail("Workspace does not contain sufficient content to test ordering on result
nodes.");
         }
         // need to re-aquire rows, {@link #getSize} may consume elements.
         rows = queryResult.getRows();
@@ -219,7 +219,7 @@
         while (rows.hasNext()) {
             String value = rows.nextRow().getValue(propName).getString();
             int cp = value.compareTo(last);
-            // if value changed evauluate if the derection is correct
+            // if value changed evaluate if the ordering is correct
             if (cp != 0) {
                 changeCnt++;
                 if (cp == 1 && descending) {
@@ -231,7 +231,7 @@
             last = value;
         }
         if (changeCnt < 1) {
-            throw new NotExecutableException("Can not test ordering on only one value");
+            fail("Workspace does not contain distinct values for " + propName);
         }
     }
 



Mime
View raw message