Skip to content

Commit

Permalink
#152 - Try harder.
Browse files Browse the repository at this point in the history
  • Loading branch information
markrmiller committed Jul 14, 2020
1 parent 68c3ffc commit f36d35a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion solr/core/src/java/org/apache/solr/core/CoreContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public CoreLoadFailure(CoreDescriptor cd, Exception loadFailure) {

private volatile UpdateShardHandler updateShardHandler;

private volatile static ThreadPoolExecutor solrCoreLoadExecutor;
public volatile static ThreadPoolExecutor solrCoreLoadExecutor;

private final OrderedExecutor replayUpdatesExecutor;

Expand Down
20 changes: 13 additions & 7 deletions solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
import org.apache.solr.client.solrj.impl.HttpClientUtil;
import org.apache.solr.cloud.autoscaling.ScheduledTriggers;
import org.apache.solr.common.TimeTracker;
import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.common.util.ObjectReleaseTracker;
import org.apache.solr.core.CoreContainer;
import org.apache.solr.servlet.SolrDispatchFilter;
import org.apache.solr.util.ExternalPaths;
import org.apache.solr.util.RandomizeSSL;
Expand Down Expand Up @@ -320,12 +322,16 @@ public void checkSyspropForceBeforeAssumptionFailure() {
@AfterClass
public static void afterSolrTestCase() throws Exception {
try {
if (suiteFailureMarker.wasSuccessful()) {
// if the tests passed, make sure everything was closed / released
String orr = ObjectReleaseTracker.checkEmpty();
ObjectReleaseTracker.clear();
assertNull(orr, orr);
}} finally {
ExecutorUtil.shutdownAndAwaitTermination(CoreContainer.solrCoreLoadExecutor);
CoreContainer.solrCoreLoadExecutor = null;

if (suiteFailureMarker.wasSuccessful()) {
// if the tests passed, make sure everything was closed / released
String orr = ObjectReleaseTracker.checkEmpty();
ObjectReleaseTracker.clear();
assertNull(orr, orr);
}
} finally {
ObjectReleaseTracker.OBJECTS.clear();
TestInjection.reset();
}
Expand All @@ -352,7 +358,7 @@ public static void afterSolrTestCase() throws Exception {
Long tooLongTime = 0L;
try {
synchronized (TimeTracker.CLOSE_TIMES) {
Map<String,TimeTracker> closeTimes = TimeTracker.CLOSE_TIMES;
Map<String, TimeTracker> closeTimes = TimeTracker.CLOSE_TIMES;
for (TimeTracker closeTime : closeTimes.values()) {
// if (closeTime.getClazz() == SolrCore.class) {
// continue;
Expand Down

0 comments on commit f36d35a

Please sign in to comment.