You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2015/09/14 14:07:12 UTC
svn commit: r1702915 -
/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/InvalidQueryTest.java
Author: fmui
Date: Mon Sep 14 12:07:11 2015
New Revision: 1702915
URL: http://svn.apache.org/r1702915
Log:
CMIS-949: fixed TCK invalid query test
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/InvalidQueryTest.java
Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/InvalidQueryTest.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/InvalidQueryTest.java?rev=1702915&r1=1702914&r2=1702915&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/InvalidQueryTest.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/InvalidQueryTest.java Mon Sep 14 12:07:11 2015
@@ -25,8 +25,10 @@ import java.util.Map;
import org.apache.chemistry.opencmis.client.api.QueryResult;
import org.apache.chemistry.opencmis.client.api.Session;
+import org.apache.chemistry.opencmis.commons.enums.BindingType;
import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
import org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
public class InvalidQueryTest extends AbstractQueryTest {
@@ -50,8 +52,15 @@ public class InvalidQueryTest extends Ab
try {
doQuery(session, "SELECT * FROM cmis:document");
addResult(createResult(WARNING, "Query capability is set to 'none' but calling query() works."));
- } catch (CmisNotSupportedException e) {
+ } catch (CmisNotSupportedException nse) {
// excepted
+ } catch (CmisObjectNotFoundException onfe) {
+ // excepted for AtomPub
+ if (getBinding() != BindingType.ATOMPUB) {
+ addResult(createResult(FAILURE,
+ "Query capability is set to 'none' but calling query() throws an exception, which is not a notSupported exception("
+ + onfe.toString() + ").", onfe, false));
+ }
} catch (Exception ex) {
addResult(createResult(FAILURE,
"Query capability is set to 'none' but calling query() throws an exception, which is not a notSupported exception("