Lucene - Core
  1. Lucene - Core
  2. LUCENE-2738

improve test coverage for omitNorms and omitTFAP

    Details

    • Type: Test Test
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.9, 5.0
    • Component/s: general/build
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      just expands on what lucenetestcase does already...

      if you say Analyzed_NO_NORMS, we might set norms anyway.
      in the same sense, if you say Index.NO, we might index it anyway, and might set omitTFAP etc.

      1. LUCENE-2738.patch
        3 kB
        Robert Muir
      2. LUCENE-2738.patch
        3 kB
        Robert Muir
      3. LUCENE-2738.patch
        15 kB
        Robert Muir

        Activity

        Hide
        Robert Muir added a comment -

        here's the start to a patch.

        worried about one fail, either i made a mistake here i don't see, or the test shouldn't be failing:

        ant test-core -Dtestcase=TestIndexWriter -Dtestmethod=testTermVectorCorruption2 -Dtests.seed=8395558104679823604:-6279799097172774748
        
        Show
        Robert Muir added a comment - here's the start to a patch. worried about one fail, either i made a mistake here i don't see, or the test shouldn't be failing: ant test-core -Dtestcase=TestIndexWriter -Dtestmethod=testTermVectorCorruption2 -Dtests.seed=8395558104679823604:-6279799097172774748
        Hide
        Robert Muir added a comment -

        nevermind, that was my problem.... heres a fixed patch.

        my coffee IV is not fully running yet.

        Show
        Robert Muir added a comment - nevermind, that was my problem.... heres a fixed patch. my coffee IV is not fully running yet.
        Hide
        Robert Muir added a comment -

        ok, here's a final patch... all tests pass (at least a few times).

        I also improved some of the better tests, if they dont need norms to use _NO_NORMS,
        and to explicitly randomly set OmitTFAP

        Show
        Robert Muir added a comment - ok, here's a final patch... all tests pass (at least a few times). I also improved some of the better tests, if they dont need norms to use _NO_NORMS, and to explicitly randomly set OmitTFAP
        Hide
        Robert Muir added a comment -

        Mike just reminded me about this one:
        My concern for not committing is that we would actually reduce test coverage,
        because most tests will create say field "foobar" in a loop like this:

        for (....) {
           newField("foobar"....);
        }
        

        So because removing norms/omitTFAP is infectious, i think we will end out
        only testing certain cases... unless we change the patch so that this random value
        is "remembered" per field name during the length of the test... i think thats the
        right solution (adding hashmap)

        Show
        Robert Muir added a comment - Mike just reminded me about this one: My concern for not committing is that we would actually reduce test coverage, because most tests will create say field "foobar" in a loop like this: for (....) { newField("foobar"....); } So because removing norms/omitTFAP is infectious, i think we will end out only testing certain cases... unless we change the patch so that this random value is "remembered" per field name during the length of the test... i think thats the right solution (adding hashmap)
        Hide
        Steve Rowe added a comment -

        Bulk move 4.4 issues to 4.5 and 5.0

        Show
        Steve Rowe added a comment - Bulk move 4.4 issues to 4.5 and 5.0
        Hide
        Uwe Schindler added a comment -

        Move issue to Lucene 4.9.

        Show
        Uwe Schindler added a comment - Move issue to Lucene 4.9.

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development