Przeglądaj źródła

Improve Unit Tests.

release/3.x.x
Christian 4 lat temu
rodzic
commit
1e2231c461
2 zmienionych plików z 2 dodań i 1 usunięć
  1. +1
    -0
      Tests/MQTTnet.Core.Tests/Mockups/TestEnvironment.cs
  2. +1
    -1
      Tests/MQTTnet.Core.Tests/Server_Tests.cs

+ 1
- 0
Tests/MQTTnet.Core.Tests/Mockups/TestEnvironment.cs Wyświetl plik

@@ -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);



+ 1
- 1
Tests/MQTTnet.Core.Tests/Server_Tests.cs Wyświetl plik

@@ -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);
}


Ładowanie…
Anuluj
Zapisz