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

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

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.6, 4.0-ALPHA
    • None
    • None
    • 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

      Attachments

        1. LUCENE-3857.patch
          16 kB
          Dawid Weiss

        Activity

          People

            dweiss Dawid Weiss
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: