From 7f186cd71d2f081c8ec6f5bf7050218b6d0748a9 Mon Sep 17 00:00:00 2001 From: Dominique Schuppli Date: Sun, 18 Jan 2026 14:03:48 +0100 Subject: [PATCH] Skip `DiagnosticsLoggerTestCase` on GitHub Actions For some reason, writing to a custom event source's log sometimes fails on GitHub Actions due to missing permissions (even when running as an admin). Ignore this one flaky test for now, it shouldn't constantly hold back all other development that has higher priority. --- .../DiagnosticLogger/DiagnosticsLoggerTestCase.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Castle.Core.Tests/Services.Logging.Tests/DiagnosticLogger/DiagnosticsLoggerTestCase.cs b/src/Castle.Core.Tests/Services.Logging.Tests/DiagnosticLogger/DiagnosticsLoggerTestCase.cs index 8f0feb3e4..ec52fa524 100644 --- a/src/Castle.Core.Tests/Services.Logging.Tests/DiagnosticLogger/DiagnosticsLoggerTestCase.cs +++ b/src/Castle.Core.Tests/Services.Logging.Tests/DiagnosticLogger/DiagnosticsLoggerTestCase.cs @@ -64,6 +64,13 @@ private void AssertAdmin() ignore = true; Assert.Ignore("This test case only valid when running as admin"); } + + bool isGitHubActions = Environment.GetEnvironmentVariable("GITHUB_ACTIONS") == "true"; + if (isGitHubActions) + { + ignore = true; + Assert.Ignore("This test case is flaky on GitHub Actions even when running as admin"); + } } catch (SecurityException) {