This is an automated email from the ASF dual-hosted git repository.

houston 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 a25c531  Add recovery check before querying in backup-restore test.
a25c531 is described below

commit a25c53112e158cfb84c59518de66581fe98e1a6c
Author: Houston Putman <[email protected]>
AuthorDate: Thu Oct 28 12:02:43 2021 -0400

    Add recovery check before querying in backup-restore test.
---
 .../solr/cloud/api/collections/AbstractIncrementalBackupTest.java    | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractIncrementalBackupTest.java
 
b/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractIncrementalBackupTest.java
index a854f91..e31489f 100644
--- 
a/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractIncrementalBackupTest.java
+++ 
b/solr/test-framework/src/java/org/apache/solr/cloud/api/collections/AbstractIncrementalBackupTest.java
@@ -171,6 +171,11 @@ public abstract class AbstractIncrementalBackupTest 
extends SolrCloudTestCase {
                     .processAndWait(solrClient, 500);
             timeTaken = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - t);
             log.info("Restored from backup, took {}ms", timeTaken);
+            t = System.nanoTime();
+            AbstractDistribZkTestBase.waitForRecoveriesToFinish(
+                restoreCollectionName, 
cluster.getSolrClient().getZkStateReader(), log.isDebugEnabled(), false, 3);
+            timeTaken = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - t);
+            log.info("Restored collection healthy, took {}ms", timeTaken);
             numFound = cluster.getSolrClient().query(restoreCollectionName,
                     new SolrQuery("*:*")).getResults().getNumFound();
             assertEquals(expectedDocsForFirstBackup, numFound);

Reply via email to