Make MessagesCache#clear methods asynchronous

This commit is contained in:
Jon Chambers authored and Jon Chambers committed 2023-08-15 14:08:16 -04:00
1 parent 4d8c4d6693
commit 5caa951c61
3 files changed
+17 -20

No files matched your search

@@ -320,7 +320,7 @@ class MessagesCacheTest {
}
}
messagesCache.clear(DESTINATION_UUID, DESTINATION_DEVICE_ID);
messagesCache.clear(DESTINATION_UUID, DESTINATION_DEVICE_ID).join();
assertEquals(Collections.emptyList(), get(DESTINATION_UUID, DESTINATION_DEVICE_ID, messageCount));
assertEquals(messageCount, get(DESTINATION_UUID, DESTINATION_DEVICE_ID + 1, messageCount).size());
@@ -340,18 +340,12 @@ class MessagesCacheTest {
}
}
messagesCache.clear(DESTINATION_UUID);
messagesCache.clear(DESTINATION_UUID).join();
assertEquals(Collections.emptyList(), get(DESTINATION_UUID, DESTINATION_DEVICE_ID, messageCount));
assertEquals(Collections.emptyList(), get(DESTINATION_UUID, DESTINATION_DEVICE_ID + 1, messageCount));
}
@Test
void testClearNullUuid() {
// We're happy as long as this doesn't throw an exception
messagesCache.clear(null);
}
@Test
void testGetAccountFromQueueName() {
assertEquals(DESTINATION_UUID,