Removing pub keyword from blockstore unit tests (#26334)
This commit is contained in:
parent
649229f7b8
commit
d964774fde
|
@ -4790,7 +4790,7 @@ pub mod tests {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_get_slot_entries1() {
|
fn test_get_slot_entries1() {
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
||||||
let entries = create_ticks(8, 0, Hash::default());
|
let entries = create_ticks(8, 0, Hash::default());
|
||||||
|
@ -4847,7 +4847,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_get_slot_entries3() {
|
fn test_get_slot_entries3() {
|
||||||
// Test inserting/fetching shreds which contain multiple entries per shred
|
// Test inserting/fetching shreds which contain multiple entries per shred
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
|
|
||||||
|
@ -4871,7 +4871,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_insert_data_shreds_consecutive() {
|
fn test_insert_data_shreds_consecutive() {
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
||||||
// Create enough entries to ensure there are at least two shreds created
|
// Create enough entries to ensure there are at least two shreds created
|
||||||
|
@ -4967,7 +4967,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_new_shreds_signal() {
|
fn test_new_shreds_signal() {
|
||||||
// Initialize blockstore
|
// Initialize blockstore
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let BlockstoreSignals {
|
let BlockstoreSignals {
|
||||||
|
@ -5050,7 +5050,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_completed_shreds_signal() {
|
fn test_completed_shreds_signal() {
|
||||||
// Initialize blockstore
|
// Initialize blockstore
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let BlockstoreSignals {
|
let BlockstoreSignals {
|
||||||
|
@ -5075,7 +5075,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_completed_shreds_signal_orphans() {
|
fn test_completed_shreds_signal_orphans() {
|
||||||
// Initialize blockstore
|
// Initialize blockstore
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let BlockstoreSignals {
|
let BlockstoreSignals {
|
||||||
|
@ -5120,7 +5120,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_completed_shreds_signal_many() {
|
fn test_completed_shreds_signal_many() {
|
||||||
// Initialize blockstore
|
// Initialize blockstore
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let BlockstoreSignals {
|
let BlockstoreSignals {
|
||||||
|
@ -5154,7 +5154,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_handle_chaining_basic() {
|
fn test_handle_chaining_basic() {
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
||||||
|
|
||||||
|
@ -5217,7 +5217,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_handle_chaining_missing_slots() {
|
fn test_handle_chaining_missing_slots() {
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
||||||
|
|
||||||
|
@ -5483,7 +5483,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_slots_connected_chain() {
|
fn test_slots_connected_chain() {
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
||||||
|
|
||||||
|
@ -5503,7 +5503,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_slots_connected_disconnected() {
|
fn test_slots_connected_disconnected() {
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
||||||
|
|
||||||
|
@ -5526,7 +5526,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_get_slots_since() {
|
fn test_get_slots_since() {
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
||||||
|
|
||||||
|
@ -5866,7 +5866,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_no_missing_shred_indexes() {
|
fn test_no_missing_shred_indexes() {
|
||||||
let slot = 0;
|
let slot = 0;
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
||||||
|
@ -5891,7 +5891,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_should_insert_data_shred() {
|
fn test_should_insert_data_shred() {
|
||||||
solana_logger::setup();
|
solana_logger::setup();
|
||||||
let (mut shreds, _) = make_slot_entries(0, 0, 200);
|
let (mut shreds, _) = make_slot_entries(0, 0, 200);
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
|
@ -5978,7 +5978,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_is_data_shred_present() {
|
fn test_is_data_shred_present() {
|
||||||
let (shreds, _) = make_slot_entries(0, 0, 200);
|
let (shreds, _) = make_slot_entries(0, 0, 200);
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
||||||
|
@ -6012,7 +6012,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_check_insert_coding_shred() {
|
fn test_check_insert_coding_shred() {
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
||||||
|
|
||||||
|
@ -6069,7 +6069,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_should_insert_coding_shred() {
|
fn test_should_insert_coding_shred() {
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
||||||
let last_root = RwLock::new(0);
|
let last_root = RwLock::new(0);
|
||||||
|
@ -6137,7 +6137,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_insert_multiple_is_last() {
|
fn test_insert_multiple_is_last() {
|
||||||
solana_logger::setup();
|
solana_logger::setup();
|
||||||
let (shreds, _) = make_slot_entries(0, 0, 20);
|
let (shreds, _) = make_slot_entries(0, 0, 20);
|
||||||
let num_shreds = shreds.len() as u64;
|
let num_shreds = shreds.len() as u64;
|
||||||
|
@ -8938,7 +8938,7 @@ pub mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn test_insert_data_shreds_same_slot_last_index() {
|
fn test_insert_data_shreds_same_slot_last_index() {
|
||||||
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
let ledger_path = get_tmp_ledger_path_auto_delete!();
|
||||||
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue