lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1303380 - in /lucene/dev/branches/branch_3x: ./ lucene/ lucene/core/src/test/org/apache/lucene/util/junitcompat/ lucene/test-framework/src/java/org/apache/lucene/util/
Date Wed, 21 Mar 2012 13:01:51 GMT
Author: rmuir
Date: Wed Mar 21 13:01:50 2012
New Revision: 1303380

URL: http://svn.apache.org/viewvc?rev=1303380&view=rev
Log:
LUCENE-3895: ensure we get a random seed if another thread throws uncaught exception

Added:
    lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSeedFromUncaught.java
      - copied unchanged from r1303376, lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSeedFromUncaught.java
Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/SorePoint.java
    lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/SoreType.java
    lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestExceptionInBeforeClassHooks.java
    lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestJUnitRuleOrder.java
    lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestReproduceMessage.java
    lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSetupTeardownChaining.java
    lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSystemPropertiesInvariantRule.java
    lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/WithNestedTests.java
    lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
    lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/StoreClassNameRule.java
    lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/SystemPropertiesInvariantRule.java
    lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/SystemPropertiesRestoreRule.java
    lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/UncaughtExceptionsRule.java

Modified: lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/SorePoint.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/SorePoint.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/SorePoint.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/SorePoint.java
Wed Mar 21 13:01:50 2012
@@ -1,6 +1,23 @@
 package org.apache.lucene.util.junitcompat;
 
 /**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
  * A pointcut-like definition where we should trigger
  * an assumption or error.
  */

Modified: lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/SoreType.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/SoreType.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/SoreType.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/SoreType.java
Wed Mar 21 13:01:50 2012
@@ -1,5 +1,22 @@
 package org.apache.lucene.util.junitcompat;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 public enum SoreType {
   ASSUMPTION,
   FAILURE,

Modified: lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestExceptionInBeforeClassHooks.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestExceptionInBeforeClassHooks.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestExceptionInBeforeClassHooks.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestExceptionInBeforeClassHooks.java
Wed Mar 21 13:01:50 2012
@@ -1,5 +1,22 @@
 package org.apache.lucene.util.junitcompat;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;

Modified: lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestJUnitRuleOrder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestJUnitRuleOrder.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestJUnitRuleOrder.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestJUnitRuleOrder.java
Wed Mar 21 13:01:50 2012
@@ -1,5 +1,22 @@
 package org.apache.lucene.util.junitcompat;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import java.util.Arrays;
 import java.util.Stack;
 

Modified: lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestReproduceMessage.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestReproduceMessage.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestReproduceMessage.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestReproduceMessage.java
Wed Mar 21 13:01:50 2012
@@ -1,5 +1,22 @@
 package org.apache.lucene.util.junitcompat;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import java.util.Arrays;
 
 import org.apache.lucene.util.LuceneTestCase;

Modified: lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSetupTeardownChaining.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSetupTeardownChaining.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSetupTeardownChaining.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSetupTeardownChaining.java
Wed Mar 21 13:01:50 2012
@@ -1,5 +1,22 @@
 package org.apache.lucene.util.junitcompat;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import org.apache.lucene.util.LuceneTestCase;
 import org.junit.Assert;
 import org.junit.Test;

Modified: lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSystemPropertiesInvariantRule.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSystemPropertiesInvariantRule.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSystemPropertiesInvariantRule.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestSystemPropertiesInvariantRule.java
Wed Mar 21 13:01:50 2012
@@ -1,5 +1,22 @@
 package org.apache.lucene.util.junitcompat;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import java.util.Properties;
 
 import org.apache.lucene.util.LuceneTestCase;

Modified: lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/WithNestedTests.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/WithNestedTests.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/WithNestedTests.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/core/src/test/org/apache/lucene/util/junitcompat/WithNestedTests.java
Wed Mar 21 13:01:50 2012
@@ -1,5 +1,22 @@
 package org.apache.lucene.util.junitcompat;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 import java.io.UnsupportedEncodingException;

Modified: lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
Wed Mar 21 13:01:50 2012
@@ -220,7 +220,7 @@ public abstract class LuceneTestCase ext
    * Catch any uncaught exceptions on threads within the suite scope and fail the test/
    * suite if they happen.
    */
-  private static final UncaughtExceptionsRule uncaughtExceptionsRule = new UncaughtExceptionsRule();

+  private static final UncaughtExceptionsRule uncaughtExceptionsRule = new UncaughtExceptionsRule(null);

 
   /**
    * This controls how suite-level rules are nested. It is important that _all_ rules declared
@@ -241,7 +241,7 @@ public abstract class LuceneTestCase ext
   @Rule
   public final TestRule ruleChain = RuleChain
     .outerRule(new RememberThreadRule())
-    .around(new UncaughtExceptionsRule())
+    .around(new UncaughtExceptionsRule(this))
     .around(new TestResultInterceptorRule())
     .around(new SystemPropertiesInvariantRule())
     .around(new InternalSetupTeardownRule())

Modified: lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/StoreClassNameRule.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/StoreClassNameRule.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/StoreClassNameRule.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/StoreClassNameRule.java
Wed Mar 21 13:01:50 2012
@@ -1,5 +1,22 @@
 package org.apache.lucene.util;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import org.junit.rules.TestRule;
 import org.junit.runner.Description;
 import org.junit.runners.model.Statement;

Modified: lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/SystemPropertiesInvariantRule.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/SystemPropertiesInvariantRule.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/SystemPropertiesInvariantRule.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/SystemPropertiesInvariantRule.java
Wed Mar 21 13:01:50 2012
@@ -1,5 +1,22 @@
 package org.apache.lucene.util;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.TreeMap;

Modified: lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/SystemPropertiesRestoreRule.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/SystemPropertiesRestoreRule.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/SystemPropertiesRestoreRule.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/SystemPropertiesRestoreRule.java
Wed Mar 21 13:01:50 2012
@@ -1,5 +1,22 @@
 package org.apache.lucene.util;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import java.util.*;
 
 import org.junit.rules.TestRule;

Modified: lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/UncaughtExceptionsRule.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/UncaughtExceptionsRule.java?rev=1303380&r1=1303379&r2=1303380&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/UncaughtExceptionsRule.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/test-framework/src/java/org/apache/lucene/util/UncaughtExceptionsRule.java
Wed Mar 21 13:01:50 2012
@@ -1,5 +1,22 @@
 package org.apache.lucene.util;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.lang.Thread.UncaughtExceptionHandler;
@@ -20,6 +37,12 @@ public class UncaughtExceptionsRule impl
   // This was originally volatile, but I don't think it needs to be. It's the same
   // thread accessing it, always.
   private UncaughtExceptionHandler savedUncaughtExceptionHandler;
+  
+  private final LuceneTestCase ltc;
+  
+  public UncaughtExceptionsRule(LuceneTestCase ltc) {
+    this.ltc = ltc;
+  }
 
   public static class UncaughtExceptionEntry {
     public final Thread thread;
@@ -61,6 +84,15 @@ public class UncaughtExceptionsRule impl
           uncaughtExceptions.clear();
         }
 
+        if (!errors.isEmpty()) {
+          if (ltc == null) {
+            // class level failure (e.g. afterclass)
+            LuceneTestCase.reportPartialFailureInfo();
+          } else {
+            // failure in a method
+            ltc.reportAdditionalFailureInfo();
+          }
+        }
         MultipleFailureException.assertEmpty(errors);
       }
     };



Mime
View raw message