jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-481) SQL2PathEscapingTest failing
Date Wed, 05 Dec 2012 16:42:58 GMT

    [ https://issues.apache.org/jira/browse/OAK-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510578#comment-13510578
] 

Thomas Mueller commented on OAK-481:
------------------------------------

Yes, those tests rely on a specific (in my view strange) behavior of the SQL-2 parser in Jackrabbit.
I have opened http://java.net/jira/browse/JSR_333-53 to clarify this in the JCR spec.
                
> SQL2PathEscapingTest failing
> ----------------------------
>
>                 Key: OAK-481
>                 URL: https://issues.apache.org/jira/browse/OAK-481
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: jcr
>            Reporter: Alex Parvulescu
>
> Following the fix of OAK-295, we now have a bunch of new test failures to look at coming
from {{SQL2PathEscapingTest}}: 
>   {{testGetChildrenNoEscaping}} Wrong hit count. expected:<0> but was:<2>
>   {{testGetChildrenEscapedFull}} 
> {code}
> java.text.ParseException: Query: select * from [nt:base] AS selector where ISCHILDNODE(selector,
['/testroot/a b'])(*); expected: absolute path
> {code}
>     {{testGetChildrenEscapedNode}} Wrong hit count. expected:<2> but was:<0>
> Full test trace following:
> {code}
> org.apache.jackrabbit.core.query.SQL2PathEscapingTest
> testGetChildrenNoEscaping(org.apache.jackrabbit.core.query.SQL2PathEscapingTest)
> junit.framework.AssertionFailedError: Wrong hit count. expected:<0> but was:<2>
> 	at junit.framework.Assert.fail(Assert.java:50)
> 	at junit.framework.Assert.failNotEquals(Assert.java:287)
> 	at junit.framework.Assert.assertEquals(Assert.java:67)
> 	at junit.framework.Assert.assertEquals(Assert.java:199)
> 	at org.apache.jackrabbit.core.query.AbstractQueryTest.checkResult(AbstractQueryTest.java:92)
> 	at org.apache.jackrabbit.core.query.SQL2PathEscapingTest.testGetChildrenNoEscaping(SQL2PathEscapingTest.java:67)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at junit.framework.TestCase.runTest(TestCase.java:168)
> 	at junit.framework.TestCase.runBare(TestCase.java:134)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:124)
> 	at org.apache.jackrabbit.test.AbstractJCRTest.run(AbstractJCRTest.java:456)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:243)
> 	at junit.framework.TestSuite.run(TestSuite.java:238)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:243)
> 	at org.apache.jackrabbit.test.ConcurrentTestSuite.access$001(ConcurrentTestSuite.java:29)
> 	at org.apache.jackrabbit.test.ConcurrentTestSuite$2.run(ConcurrentTestSuite.java:67)
> 	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Thread.java:662)
> testGetChildrenEscapedFull(org.apache.jackrabbit.core.query.SQL2PathEscapingTest)
> javax.jcr.query.InvalidQueryException: java.text.ParseException: Query: select * from
[nt:base] AS selector where ISCHILDNODE(selector, ['/testroot/a b'])(*); expected: absolute
path
> 	at org.apache.jackrabbit.oak.jcr.query.QueryManagerImpl.executeQuery(QueryManagerImpl.java:126)
> 	at org.apache.jackrabbit.oak.jcr.query.QueryImpl.execute(QueryImpl.java:83)
> 	at org.apache.jackrabbit.core.query.AbstractQueryTest.executeSQL2Query(AbstractQueryTest.java:269)
> 	at org.apache.jackrabbit.core.query.SQL2PathEscapingTest.testGetChildrenEscapedFull(SQL2PathEscapingTest.java:81)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at junit.framework.TestCase.runTest(TestCase.java:168)
> 	at junit.framework.TestCase.runBare(TestCase.java:134)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:124)
> 	at org.apache.jackrabbit.test.AbstractJCRTest.run(AbstractJCRTest.java:456)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:243)
> 	at junit.framework.TestSuite.run(TestSuite.java:238)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:243)
> 	at org.apache.jackrabbit.test.ConcurrentTestSuite.access$001(ConcurrentTestSuite.java:29)
> 	at org.apache.jackrabbit.test.ConcurrentTestSuite$2.run(ConcurrentTestSuite.java:67)
> 	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Thread.java:662)
> Caused by: java.text.ParseException: Query: select * from [nt:base] AS selector where
ISCHILDNODE(selector, ['/testroot/a b'])(*); expected: absolute path
> 	at org.apache.jackrabbit.oak.query.SQL2Parser.getSyntaxError(SQL2Parser.java:1104)
> 	at org.apache.jackrabbit.oak.query.SQL2Parser.readAbsolutePath(SQL2Parser.java:458)
> 	at org.apache.jackrabbit.oak.query.SQL2Parser.parseConditionFunctionIf(SQL2Parser.java:437)
> 	at org.apache.jackrabbit.oak.query.SQL2Parser.parseCondition(SQL2Parser.java:290)
> 	at org.apache.jackrabbit.oak.query.SQL2Parser.parseAnd(SQL2Parser.java:273)
> 	at org.apache.jackrabbit.oak.query.SQL2Parser.parseConstraint(SQL2Parser.java:265)
> 	at org.apache.jackrabbit.oak.query.SQL2Parser.parse(SQL2Parser.java:127)
> 	at org.apache.jackrabbit.oak.query.QueryEngineImpl.parseQuery(QueryEngineImpl.java:80)
> 	at org.apache.jackrabbit.oak.query.QueryEngineImpl.executeQuery(QueryEngineImpl.java:109)
> 	at org.apache.jackrabbit.oak.query.SessionQueryEngineImpl.executeQuery(SessionQueryEngineImpl.java:73)
> 	at org.apache.jackrabbit.oak.jcr.query.QueryManagerImpl.executeQuery(QueryManagerImpl.java:120)
> 	... 21 more
> testGetChildrenEscapedNode(org.apache.jackrabbit.core.query.SQL2PathEscapingTest)
> junit.framework.AssertionFailedError: Wrong hit count. expected:<2> but was:<0>
> 	at junit.framework.Assert.fail(Assert.java:50)
> 	at junit.framework.Assert.failNotEquals(Assert.java:287)
> 	at junit.framework.Assert.assertEquals(Assert.java:67)
> 	at junit.framework.Assert.assertEquals(Assert.java:199)
> 	at org.apache.jackrabbit.core.query.AbstractQueryTest.checkResult(AbstractQueryTest.java:92)
> 	at org.apache.jackrabbit.core.query.SQL2PathEscapingTest.testGetChildrenEscapedNode(SQL2PathEscapingTest.java:94)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at junit.framework.TestCase.runTest(TestCase.java:168)
> 	at junit.framework.TestCase.runBare(TestCase.java:134)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:124)
> 	at org.apache.jackrabbit.test.AbstractJCRTest.run(AbstractJCRTest.java:456)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:243)
> 	at junit.framework.TestSuite.run(TestSuite.java:238)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:243)
> 	at org.apache.jackrabbit.test.ConcurrentTestSuite.access$001(ConcurrentTestSuite.java:29)
> 	at org.apache.jackrabbit.test.ConcurrentTestSuite$2.run(ConcurrentTestSuite.java:67)
> 	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Thread.java:662)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message