Skip to content

Commit

Permalink
fix possible fail test with optimization enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Jan 23, 2025
1 parent edff4f0 commit c5c77b0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/fiber/tests/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4514,6 +4514,9 @@ async fn test_connect_to_peers_with_mutual_channel_on_restart_1() {
)
.await;

// sleep for a while to make sure this test works both for release mode
tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;

node_a.restart().await;

node_a.expect_event(
Expand Down Expand Up @@ -4554,6 +4557,9 @@ async fn test_connect_to_peers_with_mutual_channel_on_restart_2() {
)
.await;

// sleep for a while to make sure this test works both for release mode
tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;

node_a.stop().await;

node_b.expect_event(
Expand Down

0 comments on commit c5c77b0

Please sign in to comment.