mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 09:13:02 +08:00
Add long runnings tests for all QoS levels.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user