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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development