Changes done
authorAnirudh Agnihotry <anagniho@microsoft.com>
Mon, 23 Oct 2017 17:59:41 +0000 (10:59 -0700)
committerAnirudh Agnihotry <anagniho@microsoft.com>
Mon, 23 Oct 2017 17:59:41 +0000 (10:59 -0700)
Commit migrated from https://github.com/dotnet/corefx/commit/896ea2138a266a6512df99c76b4fdc46c58ccbef

src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogEntryWrittenTest.cs
src/libraries/System.Diagnostics.EventLog/tests/EventLogTests/EventLogWriteEntryTests.cs
src/libraries/System.Diagnostics.EventLog/tests/Helpers.cs

index c0757b9..407f8bd 100644 (file)
@@ -39,6 +39,9 @@ namespace System.Diagnostics.Tests
                             eventLog.WriteEntry(message, EventLogEntryType.Information);
                             Assert.True(signal.WaitOne(6000));
                         }
+                        // The system responds to WriteEntry only if the last write event occurred at least six seconds previously.
+                        // This implies that the system will only receive one EntryWritten event notification within a six-second interval, even if more than one event log change occurs.
+                        // For more information https://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.entrywritten(v=vs.110).aspx
                     }
                 }
             }
index 8bf1d38..f6d2ed9 100644 (file)
@@ -2,7 +2,6 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-
 using System.ComponentModel;
 using Xunit;
 
@@ -61,7 +60,6 @@ namespace System.Diagnostics.Tests
                     eventLog.WriteEntry(message);
                 }
 
-
                 if (eventLog.Entries.Count == 0)
                     return null;
 
index 1d3dc81..a1208b8 100644 (file)
@@ -6,7 +6,7 @@ namespace System.Diagnostics.Tests
 {
     internal class Helpers
     {
-        public static bool IsElevatedAndSupportsEventLogs { get => AdminHelpers.IsProcessElevated() && PlatformDetection.IsNotWindowsNanoServer; }
+        public static bool IsElevatedAndSupportsEventLogs { get => AdminHelpers.IsProcessElevated() && SupportsEventLogs; }
         public static bool SupportsEventLogs { get => PlatformDetection.IsNotWindowsNanoServer; }
     }
 }