You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ds...@apache.org on 2022/05/27 20:19:44 UTC
[solr] branch main updated: SOLR-16104: TestCoreDiscovery.testTooManyTransientCores() to use retryUntil logic (#772)
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new d3e97794237 SOLR-16104: TestCoreDiscovery.testTooManyTransientCores() to use retryUntil logic (#772)
d3e97794237 is described below
commit d3e97794237d42f19c99edb005f8a4cbd428f12c
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Fri May 27 21:19:39 2022 +0100
SOLR-16104: TestCoreDiscovery.testTooManyTransientCores() to use retryUntil logic (#772)
Co-authored-by: David Smiley <ds...@apache.org>
---
solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java b/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java
index 9138c769840..846b2658a14 100644
--- a/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java
+++ b/solr/core/src/test/org/apache/solr/core/TestCoreDiscovery.java
@@ -35,10 +35,12 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.Properties;
+import java.util.concurrent.TimeUnit;
import org.apache.commons.io.FileUtils;
import org.apache.lucene.util.IOUtils;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.SolrException;
+import org.apache.solr.common.util.RetryUtil;
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -327,10 +329,12 @@ public class TestCoreDiscovery extends SolrTestCaseJ4 {
cc.load();
// Just check that the proper number of cores are loaded since making the test depend on order
// would be fragile
- assertEquals(
+ RetryUtil.retryUntil(
"There should only be 3 cores loaded, coreLOS and two coreT? cores",
- 3,
- cc.getLoadedCoreNames().size());
+ 5,
+ 200,
+ TimeUnit.MILLISECONDS,
+ () -> 3 == cc.getLoadedCoreNames().size());
SolrCore c1 = cc.getCore("coreT1");
assertNotNull("Core T1 should NOT BE NULL", c1);