Fix a flaky test by waiting for the async insert to complete before attempting to remove the message
Some checks failed
Update Documentation / build (push) Has been cancelled
Service CI / build (push) Has been cancelled

This commit is contained in:
Katherine Yen 2026-06-08 17:31:20 -04:00 committed by Jon Chambers
parent b93da1323b
commit 2c5210e7c4

View File

@ -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));