Fix a flaky test by waiting for the async insert to complete before attempting to remove the message

This commit is contained in:
Katherine Yen authored and Jon Chambers committed 2026-06-08 17:42:35 -04:00
1 parent b93da1323b
commit 2c5210e7c4
1 file changed
+1 -1
@@ -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));