diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java index 87b99411a185..b9bcf7b254b6 100644 --- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java +++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java @@ -1323,7 +1323,9 @@ public void doTestIndexAndConfigAliasReplication() throws Exception { slaveClient.commit(); slaveQueryRsp = rQuery(1, "id:2001", slaveClient); - SolrDocument d = ((SolrDocumentList) slaveQueryRsp.get("response")).get(0); + final SolrDocumentList sdl = (SolrDocumentList) slaveQueryRsp.get("response"); + assertEquals(1, sdl.getNumFound()); + final SolrDocument d = sdl.get(0); assertEquals("n2001", (String) d.getFieldValue("newname")); checkForSingleIndex(masterJetty);