Skip to content

Commit

Permalink
test: shuffle RPC env
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Dec 3, 2024
1 parent 7aefb03 commit 9fd8cd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/test-utils/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ fn next_archive_endpoint(is_ws: bool) -> String {

let rpc_env_vars = env::var(env_urls).unwrap_or_default();
if !rpc_env_vars.is_empty() {
let urls = rpc_env_vars.split(',').collect::<Vec<&str>>();
let mut urls = rpc_env_vars.split(',').collect::<Vec<&str>>();
urls.shuffle(&mut rand::thread_rng());
next(&urls).to_string()
} else if is_ws {
format!("wss://eth-mainnet.g.alchemy.com/v2/{}", next(&ALCHEMY_KEYS))
Expand Down

0 comments on commit 9fd8cd1

Please sign in to comment.