chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1369750 - /chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java
Date Mon, 06 Aug 2012 08:42:37 GMT
Author: fmui
Date: Mon Aug  6 08:42:37 2012
New Revision: 1369750

URL: http://svn.apache.org/viewvc?rev=1369750&view=rev
Log:
Improved TCK warning

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java?rev=1369750&r1=1369749&r2=1369750&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java
Mon Aug  6 08:42:37 2012
@@ -366,7 +366,7 @@ public abstract class AbstractSessionTes
             // create the document
             result = parent.createDocument(properties, contentStream, versioningState, null,
null, null,
                     SELECT_ALL_NO_CACHE_OC);
-            
+
             contentStream.getStream().close();
         } catch (Exception e) {
             addResult(createResult(UNEXPECTED_EXCEPTION, "Document could not be created!
Exception: " + e.getMessage(),
@@ -1573,8 +1573,12 @@ public abstract class AbstractSessionTes
             lastName = child.getName();
         }
 
-        f = createResult(WARNING, "Number of children doesn't match the reported total number
of items!");
-        addResult(results, assertEquals(childrenCount, children.getTotalNumItems(), null,
f));
+        if (children.getTotalNumItems() >= 0) {
+            f = createResult(WARNING, "Number of children doesn't match the reported total
number of items!");
+            addResult(results, assertEquals(childrenCount, children.getTotalNumItems(), null,
f));
+        } else {
+            addResult(results, createResult(WARNING, "getChildren did not report the total
number of items!"));
+        }
 
         f = createResult(WARNING,
                 "Children should be ordered by cmis:name, but they are not! (It might be
a collation mismtach.)");



Mime
View raw message