Add class name to test history (#10895)

This commit is contained in:
wrexbe
2022-08-27 20:18:42 -07:00
committed by GitHub
parent 4f7f46590e
commit cf84c20f68

View File

@@ -222,10 +222,16 @@ public static class PoolManager
public static async Task<PairTracker> GetServerClient(PoolSettings poolSettings = null) =>
await GetServerClientPair(poolSettings ?? new PoolSettings());
private static string GetDefaultTestName()
{
return TestContext.CurrentContext.Test.FullName
.Replace("Content.IntegrationTests.Tests.", "");
}
private static async Task<PairTracker> GetServerClientPair(PoolSettings poolSettings)
{
DieIfPoolFailure();
var currentTestName = poolSettings.TestName ?? TestContext.CurrentContext.Test.Name;
var currentTestName = poolSettings.TestName ?? GetDefaultTestName();
var poolRetrieveTimeWatch = new Stopwatch();
await TestContext.Out.WriteLineAsync($"{nameof(GetServerClientPair)}: Called by test {currentTestName}");
Pair pair = null;