From eed989cbf52398a0c3de1b0f6a5f5f7a1ae740ea Mon Sep 17 00:00:00 2001 From: benbierens Date: Mon, 15 Apr 2024 11:37:14 +0200 Subject: [PATCH] Handle errors during log download --- Tests/DistTestCore/DistTest.cs | 2 +- Tests/DistTestCore/TestLifecycle.cs | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Tests/DistTestCore/DistTest.cs b/Tests/DistTestCore/DistTest.cs index cfc3158..b6c0ba9 100644 --- a/Tests/DistTestCore/DistTest.cs +++ b/Tests/DistTestCore/DistTest.cs @@ -98,7 +98,7 @@ namespace DistTestCore } catch (Exception ex) { - fixtureLog.Error("Cleanup failed: " + ex.Message); + fixtureLog.Error("Cleanup failed: " + ex); GlobalTestFailure.HasFailed = true; } } diff --git a/Tests/DistTestCore/TestLifecycle.cs b/Tests/DistTestCore/TestLifecycle.cs index 1421fe5..542ca27 100644 --- a/Tests/DistTestCore/TestLifecycle.cs +++ b/Tests/DistTestCore/TestLifecycle.cs @@ -93,13 +93,20 @@ namespace DistTestCore public void DownloadAllLogs() { - foreach (var rc in runningContainers) + try { - foreach (var c in rc.Containers) + foreach (var rc in runningContainers) { - CoreInterface.DownloadLog(c); + foreach (var c in rc.Containers) + { + CoreInterface.DownloadLog(c); + } } } + catch (Exception ex) + { + Log.Error("Exception during log download: " + ex); + } } } }