Skip to content

Commit

Permalink
chore: tunnel test wait 5s for server starts
Browse files Browse the repository at this point in the history
  • Loading branch information
zonyitoo committed Dec 9, 2024
1 parent 6b67223 commit cc4606a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/tunnel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async fn tcp_tunnel() {
tokio::spawn(run_local(local_config));
tokio::spawn(run_server(server_config));

time::sleep(Duration::from_secs(1)).await;
time::sleep(Duration::from_secs(5)).await;

// Connect it directly, because it is now established a TCP tunnel with detectportal.firefox.com
let mut stream = TcpStream::connect(("127.0.0.1", local_port)).await.unwrap();
Expand Down Expand Up @@ -148,7 +148,7 @@ async fn udp_tunnel() {
tokio::spawn(run_local(local_config));
tokio::spawn(run_server(server_config));

time::sleep(Duration::from_secs(1)).await;
time::sleep(Duration::from_secs(5)).await;

const MESSAGE: &[u8] = b"hello shadowsocks";

Expand Down

0 comments on commit cc4606a

Please sign in to comment.