Skip to content

Commit

Permalink
test(tap-agent): remove false positives
Browse files Browse the repository at this point in the history
Signed-off-by: Gustavo Inacio <gustavo@semiotic.ai>
  • Loading branch information
gusinacio committed Jul 9, 2024
1 parent 9bcb979 commit f37cf7f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions tap-agent/src/agent/sender_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ pub mod tests {
))
.unwrap();

tokio::time::sleep(Duration::from_millis(10)).await;
tokio::time::sleep(Duration::from_millis(20)).await;

assert_eq!(
triggered_rav_request.load(std::sync::atomic::Ordering::SeqCst),
Expand Down Expand Up @@ -1189,7 +1189,7 @@ pub mod tests {
},
))
.unwrap();
tokio::time::sleep(Duration::from_millis(30)).await;
tokio::time::sleep(Duration::from_millis(100)).await;

let retry_value = triggered_rav_request.load(std::sync::atomic::Ordering::SeqCst);
assert!(retry_value > 1, "It didn't retry more than once");
Expand Down Expand Up @@ -1236,7 +1236,7 @@ pub mod tests {
))
.unwrap();

tokio::time::sleep(Duration::from_millis(10)).await;
tokio::time::sleep(Duration::from_millis(20)).await;
};
}

Expand All @@ -1252,7 +1252,7 @@ pub mod tests {
))
.unwrap();

tokio::time::sleep(Duration::from_millis(10)).await;
tokio::time::sleep(Duration::from_millis(20)).await;
};
}

Expand Down Expand Up @@ -1519,7 +1519,7 @@ pub mod tests {
HashMap::from([(SENDER.1, vec![SIGNER.1])]),
));

tokio::time::sleep(Duration::from_millis(10)).await;
tokio::time::sleep(Duration::from_millis(20)).await;

let deny = call!(sender_account, SenderAccountMessage::GetDeny).unwrap();
assert!(deny, "should block the sender");
Expand Down
2 changes: 1 addition & 1 deletion tap-agent/src/agent/sender_accounts_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ mod tests {
))
.unwrap();

tokio::time::sleep(std::time::Duration::from_millis(10)).await;
tokio::time::sleep(std::time::Duration::from_millis(20)).await;
// verify if it gets removed
let actor_ref =
ActorRef::<SenderAccountMessage>::where_is(format!("{}:{}", prefix, SENDER.1));
Expand Down
2 changes: 1 addition & 1 deletion tap-agent/src/agent/sender_allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ pub mod tests {
.await;

sender_allocation.stop_and_wait(None, None).await.unwrap();
tokio::time::sleep(std::time::Duration::from_millis(10)).await;
tokio::time::sleep(std::time::Duration::from_millis(20)).await;

// check if the actor is actually stopped
assert_eq!(sender_allocation.get_status(), ActorStatus::Stopped);
Expand Down

0 comments on commit f37cf7f

Please sign in to comment.