markrmiller commented on a change in pull request #112:
URL: https://github.com/apache/solr/pull/112#discussion_r625461834
##########
File path: solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
##########
@@ -552,7 +557,7 @@ private void waitForNumDocsInAllReplicas(int numDocs,
Collection<Replica> replic
}
}
- private void waitForDeletion(String collection) throws InterruptedException,
KeeperException {
+ static void waitForDeletion(String collection) throws InterruptedException,
KeeperException {
Review comment:
+1 on methods that can be static being static - more efficient when done
consistently - also, seems like these checks are a bit general to be in this
test class, but unrelated to your patch.
##########
File path: solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
##########
@@ -528,17 +529,21 @@ private void waitForNumDocsInAllActiveReplicas(int
numDocs) throws IOException,
}
private void waitForNumDocsInAllReplicas(int numDocs, Collection<Replica>
replicas) throws IOException, SolrServerException, InterruptedException {
- waitForNumDocsInAllReplicas(numDocs, replicas, "*:*");
+ waitForNumDocsInAllReplicas(numDocs, replicas, "*:*", null, null);
}
- private void waitForNumDocsInAllReplicas(int numDocs, Collection<Replica>
replicas, String query) throws IOException, SolrServerException,
InterruptedException {
+ static void waitForNumDocsInAllReplicas(int numDocs, Collection<Replica>
replicas, String query, String user, String pass) throws IOException,
SolrServerException, InterruptedException {
TimeOut t = new TimeOut(REPLICATION_TIMEOUT_SECS, TimeUnit.SECONDS,
TimeSource.NANO_TIME);
for (Replica r:replicas) {
try (HttpSolrClient replicaClient = getHttpSolrClient(r.getCoreUrl())) {
while (true) {
try {
+ QueryRequest req = new QueryRequest(new SolrQuery(query));
Review comment:
nit: should be able to create the object once outside of the loop?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]