Sfoglia il codice sorgente

Improve Unit Tests.

release/3.x.x
Christian 4 anni fa
parent
commit
1e2231c461
2 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  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 Vedi File

@@ -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 Vedi File

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


Caricamento…
Annulla
Salva