From b1b503ccbbe8d451029b99fee87b1e5e69d83715 Mon Sep 17 00:00:00 2001 From: Milan Miladinovic Date: Thu, 28 Mar 2024 21:30:18 -0400 Subject: [PATCH] fixup! Coalesce reads via flush --- src/workerd/io/actor-cache-test.c++ | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/workerd/io/actor-cache-test.c++ b/src/workerd/io/actor-cache-test.c++ index 3dd036c7cbd2..bd81712b6f74 100644 --- a/src/workerd/io/actor-cache-test.c++ +++ b/src/workerd/io/actor-cache-test.c++ @@ -1752,6 +1752,8 @@ KJ_TEST("ActorCache list() with limit") { // Stuff after the last key is not in cache. (void)expectUncached(test.get("fooa")); + // Return our uncached get. + mockStorage->expectCall("get", ws).withParams(CAPNP(key = "fooa")).thenReturn(CAPNP()); // Listing the same range again, with the same limit or lower, is fully cached. KJ_ASSERT(expectCached(test.list("bar", "qux", 3)) == @@ -1783,9 +1785,6 @@ KJ_TEST("ActorCache list() with limit") { // Cached if we try it again though. KJ_ASSERT(expectCached(test.list("bar", "qux", 4)) == kvs({{"bar", "456"}, {"baz", "789"}, {"foo", "123"}, {"garply", "54321"}})); - - // Return our uncached get from earlier. - mockStorage->expectCall("get", ws).withParams(CAPNP(key = "fooa")).thenReturn(CAPNP()); } KJ_TEST("ActorCache list() with limit around negative entries") {