Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-10353

Add null injection to analyzer integration tests (e.g. TestRandomChains)

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.1, 10.0 (main)
    • None
    • New

    Description

      These tests inject random parameter values (from argumentProviders). Some generated values may be illegal and IllegalArgumentException is "allowed" if the constructor returns it. None of the values should cause failures at runtime.

      But for object types, we never inject null values (unless the argumentProvider were to do it itself). We should do this some low % of the time, and "allow" ctors to return NPE too.

      I see bugs in some of the analyzers where they are just a missing null check in the constructor. It is important to fail on invalid configuration up-front in the ctor, rather than failing e.g. at index time.

      Attachments

        Issue Links

          Activity

            People

              uschindler Uwe Schindler
              rcmuir Robert Muir
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h
                  3h