SOLR-5750: Fix test to specify the collection on add

(cherry picked from commit 18d933e)
This commit is contained in:
David Smiley 2016-05-05 09:41:47 -04:00
parent 333b105f55
commit 8364027886
1 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,6 @@ public class TestCloudBackupRestore extends SolrCloudTestCase {
log.info("Indexing ZERO test docs");
return;
}
CloudSolrClient client = cluster.getSolrClient();
List<SolrInputDocument> docs = new ArrayList<>(numDocs);
for (int i=0; i<numDocs; i++) {
SolrInputDocument doc = new SolrInputDocument();
@ -129,7 +128,8 @@ public class TestCloudBackupRestore extends SolrCloudTestCase {
doc.addField("shard_s", "shard" + (1 + random.nextInt(NUM_SHARDS))); // for implicit router
docs.add(doc);
}
client.add(docs);// batch
CloudSolrClient client = cluster.getSolrClient();
client.add(collectionName, docs);// batch
client.commit(collectionName);
}