Lucene - Core
  1. Lucene - Core
  2. LUCENE-2338

Some tests catch Exceptions in separate threads and just print a stack trace - the test does not fail

    Details

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

      Description

      Some tests catch Exceptions in separate threads and just print a stack trace - the test does not fail. The test should fail. Since LUCENE-2274, the LuceneTestCase(J4) class installs an UncaughtExceptionHandler, so this type of catching and solely printing a Stack trace is a bad idea. Problem is, that the run() method of threads is not allowed to throw checked Exceptions.

      Two possibilities:

      • Catch checked Exceptions in the run() method and wrap into RuntimeException or call Assert.fail() instead
      • Use Executors

        Issue Links

          Activity

          Uwe Schindler created issue -
          Uwe Schindler made changes -
          Field Original Value New Value
          Link This issue requires LUCENE-2274 [ LUCENE-2274 ]
          Robert Muir made changes -
          Component/s Build [ 12311546 ]
          Mark Thomas made changes -
          Workflow jira [ 12502501 ] Default workflow, editable Closed status [ 12563514 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12563514 ] jira [ 12585106 ]
          Michael McCandless made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 3.6 [ 12319070 ]
          Fix Version/s 4.0 [ 12314025 ]
          Resolution Fixed [ 1 ]
          Michael McCandless made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hoss Man made changes -
          Assignee Uwe Schindler [ thetaphi ]
          Uwe Schindler made changes -
          Fix Version/s 3.6 [ 12319070 ]
          Hoss Man made changes -
          Fix Version/s 4.0 [ 12322456 ]
          Fix Version/s 4.0-ALPHA [ 12314025 ]
          Robert Muir made changes -
          Fix Version/s 4.0 [ 12322550 ]
          Fix Version/s 4.0-BETA [ 12322456 ]
          Robert Muir made changes -
          Fix Version/s 4.1 [ 12321140 ]
          Fix Version/s 4.0 [ 12322550 ]
          Steve Rowe made changes -
          Fix Version/s 4.2 [ 12323899 ]
          Fix Version/s 4.1 [ 12321140 ]
          Robert Muir made changes -
          Fix Version/s 4.3 [ 12324143 ]
          Fix Version/s 4.2 [ 12323899 ]
          Uwe Schindler made changes -
          Fix Version/s 4.4 [ 12324323 ]
          Fix Version/s 4.3 [ 12324143 ]
          Steve Rowe made changes -
          Fix Version/s 5.0 [ 12321663 ]
          Fix Version/s 4.5 [ 12324742 ]
          Fix Version/s 4.4 [ 12324323 ]
          Adrien Grand made changes -
          Fix Version/s 4.6 [ 12324999 ]
          Fix Version/s 5.0 [ 12321663 ]
          Fix Version/s 4.5 [ 12324742 ]
          Simon Willnauer made changes -
          Fix Version/s 4.7 [ 12325572 ]
          Fix Version/s 4.6 [ 12324999 ]
          David Smiley made changes -
          Fix Version/s 4.8 [ 12326269 ]
          Fix Version/s 4.7 [ 12325572 ]
          Uwe Schindler made changes -
          Fix Version/s 4.9 [ 12326730 ]
          Fix Version/s 5.0 [ 12321663 ]
          Fix Version/s 4.8 [ 12326269 ]

            People

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

              Dates

              • Created:
                Updated:

                Development