Skip to content

Commit

Permalink
ignore flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
byteZorvin committed Sep 28, 2024
1 parent 4ebfb4e commit e150e0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 30 deletions.
16 changes: 3 additions & 13 deletions crates/settlement-clients/starknet/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,21 +203,11 @@ use std::env;

#[fixture]
pub fn set_workdir() {
env::set_current_dir(PathBuf::from("/Users/bytezorvin/work/karnot/madara/"))
.expect("Failed to set working directory");
let output = std::process::Command::new("cargo")
.arg("locate-project")
.arg("--workspace")
.arg("--message-format=plain")
.output()
.expect("Failed to execute command");

let cargo_toml_path = String::from_utf8(output.stdout).expect("Invalid UTF-8");
let project_root = PathBuf::from(cargo_toml_path.trim()).parent().unwrap().to_path_buf();

env::set_current_dir(&project_root).expect("Failed to set working directory");
dotenvy::from_filename_override(".env.test").expect("Failed to load the .env file");
env::set_current_dir(env::var("MADARA_BINARY_PATH").unwrap()).expect("Failed to set working directory");
}

#[ignore]
#[rstest]
#[tokio::test]
async fn madara_can_sync_a_few_blocks(_set_workdir: ()) {
Expand Down
19 changes: 2 additions & 17 deletions crates/settlement-clients/starknet/src/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,15 @@ use std::time::Duration;
use utils::settings::env::EnvSettingsProvider;
use utils::settings::Settings;

#[allow(unused)]
pub async fn spin_up_madara() -> MadaraCmd {
println!("Spinning up madara");
env::set_current_dir(env::var("MADARA_BINARY_PATH").unwrap()).expect("Failed to set working directory");

// let output = std::process::Command::new("cargo")
// .arg("locate-project")
// .arg("--workspace")
// .arg("--message-format=plain")
// .output()
// .expect("Failed to execute command");

// let cargo_toml_path = String::from_utf8(output.stdout).expect("Invalid UTF-8");
// let project_root = PathBuf::from(cargo_toml_path.trim()).parent().unwrap().to_path_buf();

// env::set_current_dir(&project_root).expect("Failed to set working directory");

println!("Current working directory: {:?}", env::current_dir().unwrap());
let mut node = MadaraCmdBuilder::new()
.args([
"--network",
"devnet",
"--no-sync-polling",
"--n-blocks-to-sync",
"20",
"--authority",
"--devnet",
"--preset=test",
Expand All @@ -59,7 +45,6 @@ pub async fn spin_up_madara() -> MadaraCmd {
node
}

#[allow(unused)]
async fn wait_for_tx_success(
account: &SingleOwnerAccount<JsonRpcClient<HttpTransport>, LocalWallet>,
transaction_hash: Felt,
Expand Down

0 comments on commit e150e0c

Please sign in to comment.