Skip to content

Commit

Permalink
improve unit test. adding extra timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
alec1o authored Dec 30, 2024
1 parent 546c2df commit 5fe9faa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/udp/FixUdp.Broadcast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void Server()

server.To.Open(host).Wait();

Thread.Sleep(millisecondsTimeout: 100);
Thread.Sleep(millisecondsTimeout: 2000);
{
Assert.True(server.IsOpened);
Assert.True(isModify);
Expand All @@ -77,7 +77,7 @@ void Server()
server.To.EventBroadcast(Guid.NewGuid().ToString(), Guid.NewGuid().ToString());

// wait for client respond broadcast
Thread.Sleep(1000);
Thread.Sleep(10000);

Assert.Equal(maxConnection, server.Clients.Length);
Assert.Equal(maxConnection, allDataReceived);
Expand Down Expand Up @@ -108,7 +108,7 @@ void Client(Host host)
// for open connection
client.To.Data([0]);

Thread.Sleep(millisecondsTimeout: 20);
Thread.Sleep(millisecondsTimeout: 2000);
{
Assert.True(client.IsOpened);
Assert.True(isModify);
Expand All @@ -118,4 +118,4 @@ void Client(Host host)
}
}
}
}
}

0 comments on commit 5fe9faa

Please sign in to comment.