Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix overflow tests #8

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@ mod test {
) -> (
BeaconChainHarness<DiskHarnessType<E>>,
Arc<OverflowLRUCache<T>>,
TempDir,
)
where
E: EthSpec,
Expand All @@ -984,15 +985,15 @@ mod test {
OverflowLRUCache::<T>::new(capacity, test_store, spec.clone())
.expect("should create cache"),
);
(harness, cache)
(harness, cache, chain_db_path)
}

#[tokio::test]
async fn overflow_cache_test_insert_components() {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = 4;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;

let (pending_block, blobs) = availability_pending_block(&harness).await;
let root = pending_block.import_data.block_root;
Expand Down Expand Up @@ -1104,7 +1105,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = 4;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;

let mut pending_blocks = VecDeque::new();
let mut pending_blobs = VecDeque::new();
Expand Down Expand Up @@ -1255,7 +1256,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = E::slots_per_epoch() as usize;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;

let n_epochs = 4;
let mut pending_blocks = VecDeque::new();
Expand Down Expand Up @@ -1395,7 +1396,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = E::slots_per_epoch() as usize;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;

let n_epochs = 4;
let mut pending_blocks = VecDeque::new();
Expand Down Expand Up @@ -1573,7 +1574,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = STATE_LRU_CAPACITY * 2;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;

let mut pending_blocks = VecDeque::new();
let mut states = Vec::new();
Expand Down
Loading