You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2014/01/08 11:39:51 UTC

[jira] [Commented] (OAK-957) SQL2NodeLocalNameTest test failures

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

Thomas Mueller commented on OAK-957:
------------------------------------

As far as I see, the test only fails when using the LowCostLuceneIndexProvider, which is a test class (not used in production). The LowCostLuceneIndexProvider forces that the Lucene index is used for all queries, even if they don't have any full-text condition. In this case, the query engine doesn't add the full-text condition because of the "or". This is the way the filter class is designed (the filter contains the intersection of all conditions). If the filter would contain the superset of all conditions, then it would be empty in this case.

So, I don't consider this a bug of the query engine. The Lucene index advertised itself (via LowCostLuceneIndexProvider) as responsible for this query, even thought the Lucene index doesn't return the correct result.

Maybe we just close this as "not an issue" as it's an artificial, known-to-be-broken way to use the Lucene index?

> SQL2NodeLocalNameTest test failures
> -----------------------------------
>
>                 Key: OAK-957
>                 URL: https://issues.apache.org/jira/browse/OAK-957
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, oak-lucene, query
>            Reporter: Michael Dürig
>            Assignee: Thomas Mueller
>             Fix For: 0.15
>
>
> {code}
> junit.framework.AssertionFailedError: Wrong hit count. expected:<2> but was:<1070>
> 	at org.apache.jackrabbit.core.query.AbstractQueryTest.checkResult(AbstractQueryTest.java:83)
> 	at org.apache.jackrabbit.core.query.SQL2NodeLocalNameTest.testLowerLocalNameOrContains(SQL2NodeLocalNameTest.java:126)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at org.apache.jackrabbit.test.AbstractJCRTest.run(AbstractJCRTest.java:464)
> 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> 	at org.junit.runners.Suite.runChild(Suite.java:128)
> 	at org.junit.runners.Suite.runChild(Suite.java:24)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
> 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> {code}
> and
> {code}
> junit.framework.AssertionFailedError: Wrong hit count. expected:<2> but was:<1070>
> 	at org.apache.jackrabbit.core.query.AbstractQueryTest.checkResult(AbstractQueryTest.java:83)
> 	at org.apache.jackrabbit.core.query.SQL2NodeLocalNameTest.testUpperLocalNameOrContains(SQL2NodeLocalNameTest.java:135)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at org.apache.jackrabbit.test.AbstractJCRTest.run(AbstractJCRTest.java:464)
> 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
> 	at org.junit.runners.Suite.runChild(Suite.java:128)
> 	at org.junit.runners.Suite.runChild(Suite.java:24)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
> 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)