From 2c5210e7c4090a723ca50a080c1fdc3d1fdcc954 Mon Sep 17 00:00:00 2001 From: Katherine Yen Date: Mon, 8 Jun 2026 17:31:20 -0400 Subject: [PATCH] Fix a flaky test by waiting for the async insert to complete before attempting to remove the message --- .../storage/MessagesCacheRemoveByGuidScriptTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/storage/MessagesCacheRemoveByGuidScriptTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/storage/MessagesCacheRemoveByGuidScriptTest.java index 026019ef7..aca714e2f 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/storage/MessagesCacheRemoveByGuidScriptTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/storage/MessagesCacheRemoveByGuidScriptTest.java @@ -38,7 +38,7 @@ class MessagesCacheRemoveByGuidScriptTest { .setServerGuid(serverGuid.toString()) .build(); - insertScript.executeAsync(destinationUuid, deviceId, envelope1); + insertScript.executeAsync(destinationUuid, deviceId, envelope1).toCompletableFuture().join(); final MessagesCacheRemoveByGuidScript removeByGuidScript = new MessagesCacheRemoveByGuidScript( REDIS_CLUSTER_EXTENSION.getRedisCluster(), mock(ScheduledExecutorService.class));