jdeppe-pivotal commented on a change in pull request #7429:
URL: https://github.com/apache/geode/pull/7429#discussion_r822114197



##########
File path: 
geode-for-redis/src/distributedTest/java/org/apache/geode/redis/internal/commands/executor/string/StringsDUnitTest.java
##########
@@ -253,49 +252,23 @@ public void 
strLen_returnsStringLengthWhileConcurrentlyUpdatingValues() {
   }
 
   @Test
-  public void givenBucketsMoveDuringAppend_thenDataIsNotLost() throws 
Exception {
-    AtomicBoolean running = new AtomicBoolean(true);
-
-    List<String> hashtags = new ArrayList<>();
-    hashtags.add(clusterStartUp.getKeyOnServer("append", 1));
-    hashtags.add(clusterStartUp.getKeyOnServer("append", 2));
-    hashtags.add(clusterStartUp.getKeyOnServer("append", 3));
-
-    Runnable task1 = () -> appendPerformAndVerify(1, hashtags.get(0), running);
-    Runnable task2 = () -> appendPerformAndVerify(2, hashtags.get(1), running);
-    Runnable task3 = () -> appendPerformAndVerify(3, hashtags.get(2), running);
-
-    Future<Void> future1 = executor.runAsync(task1);
-    Future<Void> future2 = executor.runAsync(task2);
-    Future<Void> future3 = executor.runAsync(task3);
-
-    for (int i = 0; i < 100 && running.get(); i++) {
-      clusterStartUp.moveBucketForKey(hashtags.get(i % hashtags.size()));
-      GeodeAwaitility.await().during(Duration.ofMillis(200)).until(() -> true);
-    }
-
-    running.set(false);
-
-    future1.get();
-    future2.get();
-    future3.get();
+  public void givenBucketsMoveAndPrimarySwitches_thenNoDuplicateAppendsOccur() 
{
+    String KEY = "APPEND";
+    AtomicInteger counter = new AtomicInteger(0);
+
+    new ConcurrentLoopingThreads(1000,

Review comment:
       OK, I've switched back to the original test with some small refactoring.




-- 
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]


Reply via email to