Lucene - Core
  1. Lucene - Core
  2. LUCENE-3857

exceptions from other threads in beforeclass/etc do not fail the test

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Lots of tests create indexes in beforeClass methods, but if an exception is thrown from another thread
      it won't fail the test... e.g. this test passes:

      public class TestExc extends LuceneTestCase {
        @BeforeClass
        public static void beforeClass() {
          new Thread() {
            public void run() {
              throw new RuntimeException("boo!");
            }  
          }.start();
        }
        
        public void test() { }
      }
      

      this is because the uncaught exception handler is in setup/teardown

        Activity

        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Dawid Weiss made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.6 [ 12319070 ]
        Fix Version/s 4.0 [ 12314025 ]
        Resolution Fixed [ 1 ]
        Dawid Weiss made changes -
        Attachment LUCENE-3857.patch [ 12517608 ]
        Dawid Weiss made changes -
        Field Original Value New Value
        Assignee Dawid Weiss [ dweiss ]
        Robert Muir created issue -

          People

          • Assignee:
            Dawid Weiss
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development