Merged PR 784608: Fix flaky ConcurrentPipsAnalyzerTest.TestPointTime

Fix flaky ConcurrentPipsAnalyzerTest.TestPointTime

Related work items: #2179311
This commit is contained in:
Serge Mera 2024-05-13 21:47:56 +00:00
Родитель a7214a2b3b
Коммит e7aa7ca046
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -62,13 +62,16 @@ namespace Test.Tool.Analyzers
var perfInfo = schedulerResult.RunData.RunnablePipPerformanceInfos[pip.PipId];
// Let's pick a time that points to the middle of the execution of this pip
var pointTime = perfInfo.CompletedTime - (perfInfo.TotalDuration / 2);
// Let's pick a time which matches the execution time of this single pip
var options = new List<Option>
{
new Option()
{
Name= "t",
Value= perfInfo.CompletedTime.ToString("dddd, dd MMMM, yyyy HH:mm:ss.fff")
Value= pointTime.ToString("dddd, dd MMMM, yyyy HH:mm:ss.fff")
},
};
@ -76,7 +79,7 @@ namespace Test.Tool.Analyzers
// The output file should be produced using the default location
var outputFile = schedulerResult.Config.Logging.LogsDirectory.Combine(Context.PathTable,
$"Time{perfInfo.CompletedTime.ToString("yyyyMMdd-HHmmss", CultureInfo.InvariantCulture)}.txt").ToString(Context.PathTable);
$"Time{pointTime.ToString("yyyyMMdd-HHmmss", CultureInfo.InvariantCulture)}.txt").ToString(Context.PathTable);
Assert.True(File.Exists(outputFile));