Skip to content

Commit

Permalink
Fix failing test (MystenLabs#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
oxade authored Feb 22, 2022
1 parent 8bc908b commit 7d0e1b7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sui/src/unit_tests/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ async fn test_objects_command() -> Result<(), anyhow::Error> {
tokio::time::sleep(Duration::from_millis(100)).await;
count += 1;
}
assert!(count < 50);

// Create Wallet context.
let wallet_conf = WalletConfig::read_or_create(&working_dir.path().join("wallet.conf"))?;
Expand Down Expand Up @@ -180,6 +181,7 @@ async fn test_custom_genesis() -> Result<(), anyhow::Error> {
tokio::time::sleep(Duration::from_millis(100)).await;
count += 1;
}
assert!(count < 50);

// Wallet config
let wallet_conf = WalletConfig::read(&working_dir.path().join("wallet.conf"))?;
Expand All @@ -197,8 +199,13 @@ async fn test_custom_genesis() -> Result<(), anyhow::Error> {
.execute(&mut context)
.await?;

count = 0;
// confirm the object with custom object id.
assert!(logs_contain(format!("{}", object_id).as_str()));
while count < 50 && !logs_contain(format!("{}", object_id).as_str()) {
tokio::time::sleep(Duration::from_millis(100)).await;
count += 1;
}
assert!(count < 50);

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

0 comments on commit 7d0e1b7

Please sign in to comment.