Fix flaxy test (#1079)

This commit is contained in:
BrennanConroy 2017-05-19 16:40:41 -07:00 committed by GitHub
parent c7bac3133f
commit b6f558d60b
1 changed files with 5 additions and 2 deletions

View File

@ -158,8 +158,8 @@ namespace Microsoft.AspNetCore.Hosting
}
}
[Fact (Skip="https://github.com/aspnet/Hosting/issues/1024")]
public void WebHostShutsDownWhenTokenTriggers()
[Fact]
public async Task WebHostShutsDownWhenTokenTriggers()
{
using (var host = CreateBuilder()
.UseFakeServer()
@ -184,6 +184,9 @@ namespace Microsoft.AspNetCore.Hosting
// Wait on the host to shutdown
lifetime.ApplicationStopped.WaitHandle.WaitOne();
// Wait for RunAsync to finish to guarantee Disposal of WebHost
await runInBackground;
Assert.Equal(1, server.StartInstances[0].DisposeCalls);
}
}