nonbinaryprogrammer commented on a change in pull request #7392:
URL: https://github.com/apache/geode/pull/7392#discussion_r828542347



##########
File path: 
geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/list/LInsertDUnitTest.java
##########
@@ -136,26 +136,45 @@ public void 
givenBucketsMoveDuringLInsert_operationsAreNotLost() throws Exceptio
     return keys;
   }
 
-  private void linsertPerformAndVerify(String key, ListPosition pos, String 
pivot, String value,
+  private void linsertPerformAndVerify(String key, ListPosition pos, int 
pivotIndex,
+      String valueBase, AtomicBoolean continueInserting) {
+    int counter = 0;
+    while (continueInserting.get()) {
+      String insertedValue = valueBase + counter;
+      long startLength = jedis.llen(key);
+      String pivot = jedis.lindex(key, pivotIndex);
+      assertThat(jedis.linsert(key, pos, pivot, 
insertedValue)).isEqualTo(startLength + 1);
+
+      if (pos == BEFORE) {
+        // Increment the pivot index as we just inserted a new value before it
+        pivotIndex++;
+        assertThat(jedis.lindex(key, pivotIndex - 1)).isEqualTo(insertedValue);
+        assertThat(jedis.lindex(key, pivotIndex)).isEqualTo(pivot);
+      } else {
+        assertThat(jedis.lindex(key, pivotIndex + 1)).isEqualTo(insertedValue);
+        assertThat(jedis.lindex(key, pivotIndex)).isEqualTo(pivot);
+      }
+    }
+  }
+
+  private void linsertPerformAndVerify2(String key, ListPosition pos, int 
pivotIndex,

Review comment:
       yeah, I saw that. I'm looking at the stressNewTest failures too




-- 
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: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to