From 1e2231c461b68128344df6058432069b26ee2e10 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 16 Nov 2020 21:03:18 +0100 Subject: [PATCH] Improve Unit Tests. --- Tests/MQTTnet.Core.Tests/Mockups/TestEnvironment.cs | 1 + Tests/MQTTnet.Core.Tests/Server_Tests.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/MQTTnet.Core.Tests/Mockups/TestEnvironment.cs b/Tests/MQTTnet.Core.Tests/Mockups/TestEnvironment.cs index 333a355..648d74d 100644 --- a/Tests/MQTTnet.Core.Tests/Mockups/TestEnvironment.cs +++ b/Tests/MQTTnet.Core.Tests/Mockups/TestEnvironment.cs @@ -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); diff --git a/Tests/MQTTnet.Core.Tests/Server_Tests.cs b/Tests/MQTTnet.Core.Tests/Server_Tests.cs index 2afa89d..bf761ae 100644 --- a/Tests/MQTTnet.Core.Tests/Server_Tests.cs +++ b/Tests/MQTTnet.Core.Tests/Server_Tests.cs @@ -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); }