Add a retry to an EventLog test on Win7 (dotnet/corefx#39508)
authorStephen Toub <stoub@microsoft.com>
Mon, 15 Jul 2019 23:32:58 +0000 (19:32 -0400)
committerDan Moseley <danmose@microsoft.com>
Mon, 15 Jul 2019 23:32:58 +0000 (16:32 -0700)
Commit migrated from https://github.com/dotnet/corefx/commit/c953201a9918a5b699e6d23cd48c863975b9b14e

src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogTests.cs

index 51795a4..37ea855 100644 (file)
@@ -356,7 +356,7 @@ namespace System.Diagnostics.Tests
             foreach (var eventLog in EventLog.GetEventLogs())
             {
                 // Accessing eventlog properties should not throw.
-                Assert.True(eventLog.Entries.Count >= 0);
+                Assert.True(Helpers.RetryOnWin7(() => eventLog.Entries.Count) >= 0);
             }
         }
     }