Skip to content

Commit 4e89b9a

Browse files
yash-atreyarplusq
authored andcommitted
chore: rm flaky cache-path test (foundry-rs#9372)
1 parent 2845545 commit 4e89b9a

File tree

4 files changed

+1
-53
lines changed

4 files changed

+1
-53
lines changed

Cargo.lock

Lines changed: 0 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ alloy-transport = { version = "0.6.4", default-features = false }
203203
alloy-transport-http = { version = "0.6.4", default-features = false }
204204
alloy-transport-ipc = { version = "0.6.4", default-features = false }
205205
alloy-transport-ws = { version = "0.6.4", default-features = false }
206-
alloy-node-bindings = { version = "0.6.4", default-features = false }
207206

208207
## alloy-core
209208
alloy-dyn-abi = "0.8.11"

crates/anvil/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ alloy-rpc-client = { workspace = true, features = ["pubsub"] }
117117
alloy-transport-ipc = { workspace = true, features = ["mock"] }
118118
alloy-provider = { workspace = true, features = ["txpool-api"] }
119119
alloy-transport-ws.workspace = true
120-
alloy-node-bindings.workspace = true
121120
alloy-json-rpc.workspace = true
122121
alloy-pubsub.workspace = true
123122
foundry-test-utils.workspace = true

crates/anvil/tests/it/anvil.rs

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
33
use alloy_consensus::EMPTY_ROOT_HASH;
44
use alloy_eips::BlockNumberOrTag;
5-
use alloy_node_bindings::utils::run_with_tempdir;
6-
use alloy_primitives::{Address, U256};
5+
use alloy_primitives::Address;
76
use alloy_provider::Provider;
87
use anvil::{spawn, EthereumHardfork, NodeConfig};
9-
use std::time::Duration;
108

119
#[tokio::test(flavor = "multi_thread")]
1210
async fn test_can_change_mining_mode() {
@@ -120,33 +118,3 @@ async fn test_cancun_fields() {
120118
assert!(block.header.blob_gas_used.is_some());
121119
assert!(block.header.excess_blob_gas.is_some());
122120
}
123-
124-
#[tokio::test(flavor = "multi_thread")]
125-
#[cfg(not(windows))]
126-
async fn test_cache_path() {
127-
run_with_tempdir("custom-anvil-cache", |tmp_dir| async move {
128-
let cache_path = tmp_dir.join("cache");
129-
let (api, _handle) = spawn(
130-
NodeConfig::test()
131-
.with_cache_path(Some(cache_path.clone()))
132-
.with_max_persisted_states(Some(5_usize))
133-
.with_blocktime(Some(Duration::from_millis(1))),
134-
)
135-
.await;
136-
137-
api.anvil_mine(Some(U256::from(1000)), None).await.unwrap();
138-
139-
// sleep to ensure the cache is written
140-
tokio::time::sleep(Duration::from_secs(2)).await;
141-
142-
assert!(cache_path.exists());
143-
assert!(cache_path.read_dir().unwrap().count() > 0);
144-
145-
// Clean the directory, this is to prevent an error when temp_dir is dropped.
146-
let _ = std::fs::remove_dir_all(cache_path);
147-
148-
//sleep to ensure OS file handles are released
149-
tokio::time::sleep(Duration::from_secs(1)).await;
150-
})
151-
.await;
152-
}

0 commit comments

Comments
 (0)