mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 17:23:04 +08:00
Improve Unit Tests.
This commit is contained in:
@@ -105,6 +105,7 @@ namespace MQTTnet.Tests.Mockups
|
||||
Server = new TestServerWrapper(_mqttFactory.CreateMqttServer(ServerLogger), TestContext, this);
|
||||
|
||||
options.WithDefaultEndpointPort(ServerPort);
|
||||
options.WithMaxPendingMessagesPerClient(int.MaxValue);
|
||||
|
||||
await Server.StartAsync(options.Build()).ConfigureAwait(false);
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ namespace MQTTnet.Tests
|
||||
await c2.PublishAsync(messageBuilder.Build()).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
SpinWait.SpinUntil(() => receivedMessagesCount == 500, TimeSpan.FromSeconds(15));
|
||||
SpinWait.SpinUntil(() => receivedMessagesCount == 500, TimeSpan.FromSeconds(20));
|
||||
|
||||
Assert.AreEqual(500, receivedMessagesCount);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user