Tests wait for initial accounts hash verification to complete (#29840)
This commit is contained in:
parent
07afa22671
commit
a06f8e68a5
|
@ -6811,6 +6811,14 @@ impl Bank {
|
||||||
.check_complete()
|
.check_complete()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn wait_for_initial_accounts_hash_verification_completed_for_tests(&self) {
|
||||||
|
self.rc
|
||||||
|
.accounts
|
||||||
|
.accounts_db
|
||||||
|
.verify_accounts_hash_in_bg
|
||||||
|
.wait_for_complete()
|
||||||
|
}
|
||||||
|
|
||||||
/// Get this bank's storages to use for snapshots.
|
/// Get this bank's storages to use for snapshots.
|
||||||
///
|
///
|
||||||
/// If a base slot is provided, return only the storages that are *higher* than this slot.
|
/// If a base slot is provided, return only the storages that are *higher* than this slot.
|
||||||
|
|
|
@ -3362,7 +3362,7 @@ mod tests {
|
||||||
&Arc::default(),
|
&Arc::default(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
roundtrip_bank.wait_for_initial_accounts_hash_verification_completed_for_tests();
|
||||||
assert_eq!(original_bank, roundtrip_bank);
|
assert_eq!(original_bank, roundtrip_bank);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3474,7 +3474,7 @@ mod tests {
|
||||||
&Arc::default(),
|
&Arc::default(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
roundtrip_bank.wait_for_initial_accounts_hash_verification_completed_for_tests();
|
||||||
assert_eq!(*bank4, roundtrip_bank);
|
assert_eq!(*bank4, roundtrip_bank);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3606,7 +3606,7 @@ mod tests {
|
||||||
&Arc::default(),
|
&Arc::default(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
roundtrip_bank.wait_for_initial_accounts_hash_verification_completed_for_tests();
|
||||||
assert_eq!(*bank4, roundtrip_bank);
|
assert_eq!(*bank4, roundtrip_bank);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3728,7 +3728,7 @@ mod tests {
|
||||||
&Arc::default(),
|
&Arc::default(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
deserialized_bank.wait_for_initial_accounts_hash_verification_completed_for_tests();
|
||||||
assert_eq!(deserialized_bank, *bank4);
|
assert_eq!(deserialized_bank, *bank4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3867,6 +3867,7 @@ mod tests {
|
||||||
&Arc::default(),
|
&Arc::default(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
deserialized_bank.wait_for_initial_accounts_hash_verification_completed_for_tests();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
deserialized_bank, *bank2,
|
deserialized_bank, *bank2,
|
||||||
"Ensure rebuilding from an incremental snapshot works"
|
"Ensure rebuilding from an incremental snapshot works"
|
||||||
|
@ -3931,6 +3932,7 @@ mod tests {
|
||||||
&Arc::default(),
|
&Arc::default(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
deserialized_bank.wait_for_initial_accounts_hash_verification_completed_for_tests();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
deserialized_bank, *bank4,
|
deserialized_bank, *bank4,
|
||||||
"Ensure rebuilding from an incremental snapshot works",
|
"Ensure rebuilding from an incremental snapshot works",
|
||||||
|
|
Loading…
Reference in New Issue