cpoerschke commented on a change in pull request #744:
URL: https://github.com/apache/solr/pull/744#discussion_r830143381



##########
File path: solr/core/src/test/org/apache/solr/update/PeerSyncTest.java
##########
@@ -213,26 +214,23 @@ public void test() throws Exception {
 
     // now lets check fingerprinting causes appropriate fails
     v = 4000;
-    add(client0, seenLeader, sdoc("id", Integer.toString((int) v), 
"_version_", v));
+    add(client0, seenLeader, sdoc("id", Integer.toString(v), "_version_", v));
     docsAdded.add(4000);
     int toAdd = numVersions + 10;
-    for (int i = 0; i < toAdd; i++) {
-      add(
-          client0,
-          seenLeader,
-          sdoc("id", Integer.toString((int) v + i + 1), "_version_", v + i + 
1));
-      add(
-          client1,
-          seenLeader,
-          sdoc("id", Integer.toString((int) v + i + 1), "_version_", v + i + 
1));
-      docsAdded.add((int) v + i + 1);
+
+    List<SolrInputDocument> additionalDocs = new ArrayList<>(toAdd);
+    for (int i = v + 1; i < v + toAdd + 1; i++) {
+      additionalDocs.add(sdoc("id", Integer.toString(i), "_version_", i));
+      docsAdded.add(i);
     }
+    add(client0, seenLeader, additionalDocs);
+    add(client1, seenLeader, additionalDocs);

Review comment:
       Noting that there's a change in behaviour here (may or may not be 
relevant to the test) i.e. before `1 1 2 2 3 3 ...` is the document sequence 
and now it's `1 2 3 ... 1 2 3 ...` instead.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to