From 9c5fef5af7fa2faeec47486bc3a579f6d5b4e897 Mon Sep 17 00:00:00 2001 From: Paul Masurel Date: Mon, 26 Dec 2022 16:29:33 +0900 Subject: [PATCH] Fixing sstable proptest (#1743) --- sstable/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sstable/src/lib.rs b/sstable/src/lib.rs index c01a58acb2..ff8ff7767d 100644 --- a/sstable/src/lib.rs +++ b/sstable/src/lib.rs @@ -457,8 +457,8 @@ mod test { fn bound_strategy() -> impl Strategy> { prop_oneof![ Just(Bound::::Unbounded), - "[a-d]*".prop_map(|key| Bound::Included(key)), - "[a-d]*".prop_map(|key| Bound::Excluded(key)), + "[a-c]{0-5}".prop_map(|key| Bound::Included(key)), + "[a-c]{0-5}".prop_map(|key| Bound::Excluded(key)), ] } @@ -476,14 +476,14 @@ mod test { |(left, right)| match (extract_key(left.as_ref()), extract_key(right.as_ref())) { (None, _) => true, (_, None) => true, - (left, right) => left <= right, + (left, right) => left < right, }, ) } proptest! { #[test] - fn test_prop_test_ranges(words in prop::collection::btree_set("[a-d]*", 1..100), + fn test_proptest_sstable_ranges(words in prop::collection::btree_set("[a-c]{0-6}", 1..100), (lower_bound, upper_bound) in bounds_strategy(), ) { // TODO tweak block size.