From 23c3e0213489041330e219922d38803a42ae0399 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Wed, 20 Oct 2021 13:24:21 -0700 Subject: [PATCH] stacked_table: don't expect a certain listing order from the file system --- lib/src/stacked_table.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/src/stacked_table.rs b/lib/src/stacked_table.rs index d84d4185a..7fe571051 100644 --- a/lib/src/stacked_table.rs +++ b/lib/src/stacked_table.rs @@ -664,8 +664,9 @@ mod tests { assert_eq!(merged_table.get_value(b"abd"), Some(b"value 2".as_slice())); assert_eq!(merged_table.get_value(b"abe"), Some(b"value 4".as_slice())); // The caller shouldn't write two values for the same key, so it's undefined - // which wins, but let's test how it currently behaves. - assert_eq!(merged_table.get_value(b"mmm"), Some(b"side 1".as_slice())); + // which wins. + let value_mmm = merged_table.get_value(b"mmm"); + assert!(value_mmm == Some(b"side 1".as_slice()) || value_mmm == Some(b"side 2".as_slice())); assert_eq!(merged_table.get_value(b"yyy"), Some(b"val5".as_slice())); assert_eq!(merged_table.get_value(b"zzz"), Some(b"val3".as_slice())); assert_eq!(merged_table.get_value(b"\xff\xff\xff"), None);