Refactor async/await and ConcurrentDictionary usage.

This commit is contained in:
Christian Kratky
2018-06-20 20:07:25 +02:00
parent bc20850fba
commit 0322660561
20 changed files with 409 additions and 245 deletions
+13 -1
View File
@@ -22,6 +22,8 @@ namespace MQTTnet.TestApp.NetCore
Console.WriteLine("5 = Start public broker test");
Console.WriteLine("6 = Start server & client");
Console.WriteLine("7 = Client flow test");
Console.WriteLine("8 = Start performance test (client only)");
Console.WriteLine("9 = Start server (no trace)");
var pressedKey = Console.ReadKey(true);
if (pressedKey.KeyChar == '1')
@@ -34,7 +36,7 @@ namespace MQTTnet.TestApp.NetCore
}
else if (pressedKey.KeyChar == '3')
{
PerformanceTest.Run();
PerformanceTest.RunClientAndServer();
return;
}
else if (pressedKey.KeyChar == '4')
@@ -53,6 +55,16 @@ namespace MQTTnet.TestApp.NetCore
{
Task.Run(ClientFlowTest.RunAsync);
}
else if (pressedKey.KeyChar == '8')
{
PerformanceTest.RunClientOnly();
return;
}
else if (pressedKey.KeyChar == '9')
{
ServerTest.RunEmptyServer();
return;
}
Thread.Sleep(Timeout.Infinite);
}