diff --git a/core/storage/page_cache.rs b/core/storage/page_cache.rs index 886fdf20c..0cf05841c 100644 --- a/core/storage/page_cache.rs +++ b/core/storage/page_cache.rs @@ -843,10 +843,6 @@ mod tests { key } - fn page_has_content(page: &PageRef) -> bool { - page.is_loaded() && page.get().contents.is_some() - } - fn insert_and_get_entry(cache: &mut PageCache, id: usize) -> (PageCacheKey, PageCacheEntry) { let key = create_key(id); let page = page_with_content(id); diff --git a/core/storage/pager.rs b/core/storage/pager.rs index 7be2cf1b2..345f8335c 100644 --- a/core/storage/pager.rs +++ b/core/storage/pager.rs @@ -2423,7 +2423,7 @@ mod tests { }) }; let _ = thread.join(); - let mut cache = cache.write(); + let cache = cache.read(); let page_key = PageCacheKey::new(1); let page = cache.get(&page_key).unwrap(); assert_eq!(page.unwrap().get().id, 1);