From 729b4979a395e48f9e171281ecf4db67a0493e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Thu, 14 Sep 2023 09:02:04 +0200 Subject: [PATCH] SOLR-16954: Fix test failures caused by update circuit breaker (#1918) --- .../src/test/org/apache/solr/util/BaseTestCircuitBreaker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/util/BaseTestCircuitBreaker.java b/solr/core/src/test/org/apache/solr/util/BaseTestCircuitBreaker.java index 025db34ed76..68ee7f4ae3a 100644 --- a/solr/core/src/test/org/apache/solr/util/BaseTestCircuitBreaker.java +++ b/solr/core/src/test/org/apache/solr/util/BaseTestCircuitBreaker.java @@ -43,6 +43,7 @@ public abstract class BaseTestCircuitBreaker extends SolrTestCaseJ4 { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); protected static void indexDocs() { + removeAllExistingCircuitBreakers(); for (int i = 0; i < 20; i++) { assertU(adoc("name", "john smith", "id", "1")); assertU(adoc("name", "johathon smith", "id", "2")); @@ -269,7 +270,7 @@ public void testErrorCode() { CircuitBreaker.getErrorCode(List.of(new MemoryCircuitBreaker()))); } - private void removeAllExistingCircuitBreakers() { + private static void removeAllExistingCircuitBreakers() { h.getCore().getCircuitBreakerRegistry().deregisterAll(); }