Allow more time to see if events are in the event log (#8729)

This commit is contained in:
Justin Kotalik 2019-03-22 14:47:39 -07:00 committed by GitHub
parent 2018b82ffe
commit 26a118e462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -79,8 +79,6 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
return string.Join(",", entries.Select(e => e.Message));
}
private static IEnumerable<EventLogEntry> GetEntries(IISDeploymentResult deploymentResult)
{
var eventLog = new EventLog("Application");
@ -89,8 +87,8 @@ namespace Microsoft.AspNetCore.Server.IISIntegration.FunctionalTests
// Check results in reverse order.
var processIdString = $"Process Id: {deploymentResult.HostProcess.Id}.";
// Event log messages round down to the nearest second, so subtract a second
var processStartTime = deploymentResult.HostProcess.StartTime.AddSeconds(-1);
// Event log messages round down to the nearest second, so subtract 5 seconds to make sure we get event logs
var processStartTime = deploymentResult.HostProcess.StartTime.AddSeconds(-5);
for (var i = eventLog.Entries.Count - 1; i >= 0; i--)
{
var eventLogEntry = eventLog.Entries[i];