Skip to content

Commit a9c9c84

Browse files
committed
Fix test failing due to race condition in scheduling the heartbeat timer
1 parent 4d1a61f commit a9c9c84

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

crates/hotfix/tests/session_tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ async fn test_heartbeats() {
3737
.await;
3838
// counterparty responds with a logon to establish a happy session
3939
mock_counterparty.send_logon().await;
40+
tokio::time::advance(std::time::Duration::from_millis(5)).await;
4041

4142
// let's wait enough time for a heartbeat and assert that the heartbeat was sent
4243
tokio::time::advance(std::time::Duration::from_secs(HEARTBEAT_INTERVAL + 1)).await;

0 commit comments

Comments
 (0)