test_shrink_stale_slots_skipped only uses non-write cache (#29081)

This commit is contained in:
Jeff Washington (jwash) 2022-12-06 09:03:30 -06:00 committed by GitHub
parent 4de13be926
commit 93cc3b1d3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -13997,6 +13997,7 @@ pub mod tests {
solana_logger::setup();
let mut accounts = AccountsDb::new_single_for_tests();
// this test tests v1 code, which can not use the write cache.
accounts.caching_enabled = false;
let pubkey_count = 30000;
@ -14038,6 +14039,8 @@ pub mod tests {
);
// Only, try to shrink stale slots.
// This is the point of this v1 test, which does not use the write cache.
// The ultimate function it calls, do_shrink_slot_v1, says to delete it as soon as everyone uses the write cache.
accounts.shrink_all_stale_slots_v1();
assert_eq!(
pubkey_count,