Skip to content

Commit c66676c

Browse files
authored
Merge pull request #952 from tnull/2026-06-fix-datastore-rebase-conflict
Fix DataStore failing store pagination
2 parents aab4bff + 558ec82 commit c66676c

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/data_store.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ where
225225
mod tests {
226226
use lightning::impl_writeable_tlv_based;
227227
use lightning::io;
228+
use lightning::util::persist::{PageToken, PaginatedKVStore, PaginatedListResponse};
228229
use lightning::util::test_utils::TestLogger;
229230

230231
use super::*;
@@ -315,6 +316,16 @@ mod tests {
315316
}
316317
}
317318

319+
impl PaginatedKVStore for FailingStore {
320+
fn list_paginated(
321+
&self, _primary_namespace: &str, _secondary_namespace: &str,
322+
_page_token: Option<PageToken>,
323+
) -> impl std::future::Future<Output = Result<PaginatedListResponse, io::Error>> + 'static + Send
324+
{
325+
async { Err(io::Error::new(io::ErrorKind::Other, "list_paginated failed")) }
326+
}
327+
}
328+
318329
fn new_failing_data_store(objects: Vec<TestObject>) -> DataStore<TestObject, Arc<TestLogger>> {
319330
let store: Arc<DynStore> = Arc::new(DynStoreWrapper(FailingStore));
320331
let logger = Arc::new(TestLogger::new());

0 commit comments

Comments
 (0)