Bläddra i källkod

Improve Unit Tests.

release/3.x.x
Christian 4 år sedan
förälder
incheckning
1e2231c461
2 ändrade filer med 2 tillägg och 1 borttagningar
  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 Visa fil

@@ -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 Visa fil

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


Laddar…
Avbryt
Spara