cpoerschke commented on code in PR #924: URL: https://github.com/apache/solr/pull/924#discussion_r913912286
########## solr/core/src/test/org/apache/solr/update/MaxSizeAutoCommitTest.java: ########## @@ -204,46 +201,44 @@ public void testDeletes() throws Exception { updateHandler, () -> { updateRequestHandler.handleRequest( - constructBatchDeleteDocRequest(0, numDocsToAdd), updateResp); + constructBatchDeleteDocRequest(numDocsToAdd), updateResp); }); } /** * Construct a batch add document request with a series of very simple Solr docs with increasing * IDs. * - * @param startId the document ID to begin with * @param batchSize the number of documents to include in the batch * @return a SolrQueryRequestBase */ - private SolrQueryRequestBase constructBatchAddDocRequest(int startId, int batchSize) { - return constructBatchRequestHelper(startId, batchSize, MaxSizeAutoCommitTest::addDoc); + private SolrQueryRequestBase constructBatchAddDocRequest(int batchSize) { + return constructBatchRequestHelper(batchSize, MaxSizeAutoCommitTest::addDoc); } /** * Construct a batch delete document request, with IDs incrementing from startId * - * @param startId the document ID to begin with * @param batchSize the number of documents to include in the batch * @return a SolrQueryRequestBase */ - private SolrQueryRequestBase constructBatchDeleteDocRequest(int startId, int batchSize) { - return constructBatchRequestHelper(startId, batchSize, MaxSizeAutoCommitTest::delDoc); + private SolrQueryRequestBase constructBatchDeleteDocRequest(int batchSize) { + return constructBatchRequestHelper(batchSize, MaxSizeAutoCommitTest::delDoc); } /** * Helper for constructing a batch update request * - * @param startId the document ID to begin with * @param batchSize the number of documents to include in the batch * @param requestFn a function that takes an (int) ID and returns an XML string of the request to * add to the batch request * @return a SolrQueryRequestBase */ private SolrQueryRequestBase constructBatchRequestHelper( - int startId, int batchSize, Function<Integer, String> requestFn) { + int batchSize, Function<Integer, String> requestFn) { SolrQueryRequestBase updateReq = new SolrQueryRequestBase(core, new MapSolrParams(new HashMap<>())) {}; + int startId = 0; List<String> docs = new ArrayList<>(); for (int i = startId; i < startId + batchSize; i++) { Review Comment: ```suggestion List<String> docs = new ArrayList<>(); for (int i = 0; i < batchSize; i++) { ``` -- 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. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org