Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,17 @@ public async Task Api_Should_Start_After_ConfigureTestConfiguration()
await Assert.That(testConfigApplied).IsEqualTo("true")
.Because("Test configuration should have been applied before API started");

// Print the execution log
// Print the execution log. Snapshot under the lock first: ExecutionLog is a
// shared static list and parallel test instances may Add() to it via their
// lifecycle hooks while we enumerate, which would throw "Collection was modified".
List<string> executionLogSnapshot;
lock (Lock)
{
executionLogSnapshot = ExecutionLog.ToList();
}

Console.WriteLine("\n=== FULL EXECUTION LOG ===");
foreach (var entry in ExecutionLog)
foreach (var entry in executionLogSnapshot)
{
Console.WriteLine(entry);
}
Expand Down
Loading