Add long runnings tests for all QoS levels.

This commit is contained in:
Christian Kratky
2019-04-02 21:50:16 +02:00
parent a7204234f6
commit ad5834dd1f
5 changed files with 229 additions and 11 deletions
+16 -1
View File
@@ -25,6 +25,9 @@ namespace MQTTnet.TestApp.NetCore
Console.WriteLine("7 = Client flow test");
Console.WriteLine("8 = Start performance test (client only)");
Console.WriteLine("9 = Start server (no trace)");
Console.WriteLine("a = Start QoS 2 benchmark");
Console.WriteLine("b = Start QoS 1 benchmark");
Console.WriteLine("c = Start QoS 0 benchmark");
var pressedKey = Console.ReadKey(true);
if (pressedKey.KeyChar == '1')
@@ -66,7 +69,19 @@ namespace MQTTnet.TestApp.NetCore
ServerTest.RunEmptyServer();
return;
}
else if (pressedKey.KeyChar == 'a')
{
Task.Run(PerformanceTest.RunQoS2Test);
}
else if (pressedKey.KeyChar == 'b')
{
Task.Run(PerformanceTest.RunQoS1Test);
}
else if (pressedKey.KeyChar == 'c')
{
Task.Run(PerformanceTest.RunQoS0Test);
}
Thread.Sleep(Timeout.Infinite);
}