mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 11:45:43 +08:00
Improve unit tests.
This commit is contained in:
@@ -37,10 +37,10 @@ namespace MQTTnet.Tests
|
||||
var clientSocket = new CrossPlatformSocket(AddressFamily.InterNetwork);
|
||||
await clientSocket.ConnectAsync("localhost", 50001, CancellationToken.None);
|
||||
|
||||
await Task.Delay(100, ct.Token);
|
||||
|
||||
var tcpChannel = new MqttTcpChannel(clientSocket.GetStream(), "test", null);
|
||||
|
||||
await Task.Delay(100, ct.Token);
|
||||
|
||||
var buffer = new byte[1];
|
||||
await tcpChannel.ReadAsync(buffer, 0, 1, ct.Token);
|
||||
|
||||
|
||||
@@ -375,7 +375,7 @@ namespace MQTTnet.Tests
|
||||
await c1.PublishAsync(message);
|
||||
}
|
||||
|
||||
await Task.Delay(500);
|
||||
await Task.Delay(3000);
|
||||
|
||||
Assert.AreEqual(2000, receivedMessagesCount);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user