Skip to content

Commit

Permalink
pass consistentReads through overload
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeotic committed Sep 3, 2024
1 parent 64f40ef commit c1b4b82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tempest2/src/main/kotlin/app/cash/tempest2/LogicalDb.kt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ interface LogicalDb : LogicalTable.Factory {
fun batchLoad(
keys: Iterable<Any>,
consistentReads: Boolean
) = batchLoad(keys, consistentReads = false, MAX_BATCH_READ)
) = batchLoad(keys, consistentReads, MAX_BATCH_READ)

fun batchLoad(
vararg keys: Any,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<AlbumTrack>()).containsAll(albumTracks)
assertThat(loadedItems.getItems<PlaylistInfo>()).containsExactly(playlistInfo)
Expand Down

0 comments on commit c1b4b82

Please sign in to comment.