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

Test exception handling better/easier than testThreadInterruptDeadlock()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: general/test
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      currently the fact that MockDirectoryWrapper has throttlers and such that sleep, combined with the fact this test interrupts, makes a good test for exception handling.

      The problem is this is really crappy to debug: things dont reproduce, you have to use hundreds or thousands of iterations, etc etc.

      I think it would be better if we made it possible for MockIndexInput to throw random exceptions like MockIndexOutput and had a single threaded test that just threw random exceptions? This way it would reproduce...

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: