chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1407156 - in /chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query: AbstractQueryTest.java QueryLikeTest.java QueryRootFolderTest.java
Date Thu, 08 Nov 2012 16:26:46 GMT
Author: fmui
Date: Thu Nov  8 16:26:46 2012
New Revision: 1407156

URL: http://svn.apache.org/viewvc?rev=1407156&view=rev
Log:
CMIS-598 & CMIS-599: Skip TCK metadata query tests if the repository only supports full
text queries

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/AbstractQueryTest.java
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/QueryLikeTest.java
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/QueryRootFolderTest.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/AbstractQueryTest.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/tests/query/AbstractQueryTest.java?rev=1407156&r1=1407155&r2=1407156&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/AbstractQueryTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/AbstractQueryTest.java
Thu Nov  8 16:26:46 2012
@@ -34,4 +34,14 @@ public abstract class AbstractQueryTest 
 
         return repository.getCapabilities().getQueryCapability() != CapabilityQuery.NONE;
     }
+
+    protected boolean isFulltextOnly(Session session) {
+        RepositoryInfo repository = session.getRepositoryInfo();
+
+        if (repository.getCapabilities().getQueryCapability() == null) {
+            return false;
+        }
+
+        return repository.getCapabilities().getQueryCapability() == CapabilityQuery.FULLTEXTONLY;
+    }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/QueryLikeTest.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/tests/query/QueryLikeTest.java?rev=1407156&r1=1407155&r2=1407156&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/QueryLikeTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/QueryLikeTest.java
Thu Nov  8 16:26:46 2012
@@ -40,7 +40,7 @@ public class QueryLikeTest extends Abstr
 
     @Override
     public void run(Session session) {
-        if (supportsQuery(session)) {
+        if (supportsQuery(session) && !isFulltextOnly(session)) {
 
             OperationContext context = session.createOperationContext();
             context.setFilterString("cmis:name,cmis:creationDate");
@@ -86,7 +86,7 @@ public class QueryLikeTest extends Abstr
             }
 
         } else {
-            addResult(createResult(SKIPPED, "Query not supported. Test Skipped!"));
+            addResult(createResult(SKIPPED, "Metadata query not supported. Test Skipped!"));
         }
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/QueryRootFolderTest.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/tests/query/QueryRootFolderTest.java?rev=1407156&r1=1407155&r2=1407156&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/QueryRootFolderTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/QueryRootFolderTest.java
Thu Nov  8 16:26:46 2012
@@ -45,11 +45,11 @@ public class QueryRootFolderTest extends
 
     @Override
     public void run(Session session) {
-        if (supportsQuery(session)) {
+        if (supportsQuery(session) && !isFulltextOnly(session)) {
             queryById(session);
             queryByDate(session);
         } else {
-            addResult(createResult(SKIPPED, "Query not supported. Test Skipped!"));
+            addResult(createResult(SKIPPED, "Metadata query not supported. Test Skipped!"));
         }
     }
 



Mime
View raw message