Lucene - Core
  1. Lucene - Core
  2. LUCENE-3990

TestRandomChains failure caused by incorrect delegation in CharReader/CharFilter/CharStream API

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.9, 5.0
    • Component/s: modules/analysis
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      100% reproduces for me:

      2> NOTE: reproduce with: ant test -Dtests.class=*.TestRandomChains -Dtests.method=testRandomChains -Dtests.seed=88CA02C2BB7B1DA -Dargs="-Dfile.encoding=UTF-8"

      Running org.apache.lucene.analysis.core.TestRandomChains
      FAILURE 7.22s | TestRandomChains.testRandomChains
      > Throwable #1: java.lang.AssertionError: endOffset 1 expected:<7> but was:<8>
      > at __randomizedtesting.SeedInfo.seed([88CA02C2BB7B1DA:356D894D6CA5AC1A]:0)
      > at org.junit.Assert.fail(Assert.java:93)
      > at org.junit.Assert.failNotEquals(Assert.java:647)
      > at org.junit.Assert.assertEquals(Assert.java:128)
      > at org.junit.Assert.assertEquals(Assert.java:472)
      > at org.apache.lucene.analysis.BaseTokenStreamTestCase.assertTokenStreamContents(BaseTokenStreamTestCase.java:165)
      > at org.apache.lucene.analysis.BaseTokenStreamTestCase.checkAnalysisConsistency(BaseTokenStreamTestCase.java:662)
      > at org.apache.lucene.analysis.BaseTokenStreamTestCase.checkRandomData(BaseTokenStreamTestCase.java:486)
      > at org.apache.lucene.analysis.BaseTokenStreamTestCase.checkRandomData(BaseTokenStreamTestCase.java:429)
      > at org.apache.lucene.analysis.core.TestRandomChains.testRandomChains(TestRandomChains.java:820)

      The root cause of this is inconsequent override of several Reader methods in subclasses of CharFilter. We should fix this urgently, thanks to the random chains we found this bug.

      1. analysis-common.tests-report.txt
        7 kB
        Steve Rowe
      2. LUCENE-3990.patch
        6 kB
        Robert Muir
      3. LUCENE-3990-CharFilterFix.patch
        3 kB
        Uwe Schindler

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Uwe Schindler
              Reporter:
              Steve Rowe
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development