From c1b4b82f8faa23bab547b01bddbd260c769ca8c6 Mon Sep 17 00:00:00 2001 From: Tim Kye Date: Tue, 3 Sep 2024 15:04:07 -0700 Subject: [PATCH] pass consistentReads through overload --- tempest2/src/main/kotlin/app/cash/tempest2/LogicalDb.kt | 2 +- .../src/test/kotlin/app/cash/tempest2/LogicalDbBatchTest.kt | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tempest2/src/main/kotlin/app/cash/tempest2/LogicalDb.kt b/tempest2/src/main/kotlin/app/cash/tempest2/LogicalDb.kt index 52fcbf04..20ad32ad 100644 --- a/tempest2/src/main/kotlin/app/cash/tempest2/LogicalDb.kt +++ b/tempest2/src/main/kotlin/app/cash/tempest2/LogicalDb.kt @@ -111,7 +111,7 @@ interface LogicalDb : LogicalTable.Factory { fun batchLoad( keys: Iterable, consistentReads: Boolean - ) = batchLoad(keys, consistentReads = false, MAX_BATCH_READ) + ) = batchLoad(keys, consistentReads, MAX_BATCH_READ) fun batchLoad( vararg keys: Any, diff --git a/tempest2/src/test/kotlin/app/cash/tempest2/LogicalDbBatchTest.kt b/tempest2/src/test/kotlin/app/cash/tempest2/LogicalDbBatchTest.kt index 34ee6422..db8b45b7 100644 --- a/tempest2/src/test/kotlin/app/cash/tempest2/LogicalDbBatchTest.kt +++ b/tempest2/src/test/kotlin/app/cash/tempest2/LogicalDbBatchTest.kt @@ -54,10 +54,11 @@ class LogicalDbBatchTest { musicTable.playlistInfo.save(playlistInfo) val loadedItems = musicDb.batchLoad( - PlaylistInfo.Key("PLAYLIST_1"), + keys = listOf( PlaylistInfo.Key("PLAYLIST_1"), AlbumTrack.Key("ALBUM_1", track_number = 1), AlbumTrack.Key("ALBUM_1", track_number = 2), - AlbumTrack.Key("ALBUM_1", track_number = 3) + AlbumTrack.Key("ALBUM_1", track_number = 3)), + consistentReads = true ) assertThat(loadedItems.getItems()).containsAll(albumTracks) assertThat(loadedItems.getItems()).containsExactly(playlistInfo)