Skip to content

Commit

Permalink
fixup after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkuo committed Feb 26, 2022
1 parent 868827a commit 2b09e86
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions sui/src/unit_tests/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,7 @@ async fn start_network(
#[tokio::test]
async fn test_move_call_args_linter_command() -> Result<(), anyhow::Error> {
let working_dir = tempfile::tempdir()?;
let mut config = NetworkConfig::read_or_create(&working_dir.path().join("network.conf"))?;

SuiCommand::Genesis { config: None }
.execute(&mut config)
.await?;

// Start network
let network = task::spawn(async move { SuiCommand::Start.execute(&mut config).await });
let network = start_network(working_dir.path(), 10500, None).await?;

// Wait for authorities to come alive.
retry_assert!(
Expand Down Expand Up @@ -564,13 +557,11 @@ async fn test_move_call_args_linter_command() -> Result<(), anyhow::Error> {
.await?;
resp.print(true);

let mut count = 0;
while count < 5 && !logs_contain("Mutated Objects:") {
tokio::time::sleep(Duration::from_millis(100)).await;
count += 1;
}
retry_assert!(
logs_contain("Mutated Objects:"),
Duration::from_millis(1000)
);
assert!(logs_contain("Created Objects:"));
assert!(count < 5);

// Get the created object
let created_obj: ObjectID;
Expand Down Expand Up @@ -658,14 +649,11 @@ async fn test_move_call_args_linter_command() -> Result<(), anyhow::Error> {
.execute(&mut context)
.await?;

tokio::time::sleep(Duration::from_millis(500)).await;
let mut count = 0;
while count < 5 && !logs_contain("Mutated Objects:") {
tokio::time::sleep(Duration::from_millis(100)).await;
count += 1;
}
retry_assert!(
logs_contain("Mutated Objects:"),
Duration::from_millis(1000)
);
assert!(logs_contain("Created Objects:"));
assert!(count < 5);

network.abort();
Ok(())
Expand Down

0 comments on commit 2b09e86

Please sign in to comment.