diff --git a/tests/tree_iter_lifetime.rs b/tests/tree_iter_lifetime.rs new file mode 100644 index 0000000..55cf077 --- /dev/null +++ b/tests/tree_iter_lifetime.rs @@ -0,0 +1,22 @@ +use lsm_tree::{UserKey, UserValue}; +use std::path::Path; + +fn iterrr( + path: &Path, +) -> lsm_tree::Result>> { + let tree = lsm_tree::Config::new(path).open()?; + + for x in 0..100u32 { + let x = x.to_be_bytes(); + tree.insert(x, x, 0); + } + + Ok(tree.iter()) +} + +#[test_log::test] +fn segment_reader_mvcc_slab() -> lsm_tree::Result<()> { + let folder = tempfile::tempdir().unwrap(); + assert_eq!(100, iterrr(folder.path())?.count()); + Ok(()) +}