mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-05-25 10:39:28 +00:00
log errors when there are test setup failures
This commit is contained in:
parent
23da2c36ec
commit
ba9822d0e2
@ -100,9 +100,9 @@ namespace DistTestCore
|
||||
using var raw = new StreamWriter(Console.OpenStandardOutput(), leaveOpen: true) { AutoFlush = true };
|
||||
raw.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(entry));
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Best-effort; don't fail the teardown if status emission fails.
|
||||
Console.Error.WriteLine($"[test-result-emit] Failed: {ex}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -52,6 +52,10 @@ namespace DistTestCore
|
||||
{
|
||||
GlobalTestFailure.HasFailed = true;
|
||||
log.Error($"Global setup cleanup failed with: {ex}");
|
||||
// Write directly to raw stderr so this is visible even when NUnit
|
||||
// captures Console.Out/Console.Error for the fixture setup context.
|
||||
using var err = new StreamWriter(Console.OpenStandardError(), leaveOpen: true) { AutoFlush = true };
|
||||
err.WriteLine($"[global-setup-failure] {ex}");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user