Reacting to hosting test server changes
This commit is contained in:
parent
5d5f278824
commit
208f0f8a58
|
|
@ -9,6 +9,7 @@ using System.Linq;
|
|||
using System.Reflection;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.AspNet.FileProviders;
|
||||
|
|
@ -497,6 +498,9 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
// Act
|
||||
await server.CreateClient().GetAsync("/path");
|
||||
|
||||
// This ensures that all diagnostics are completely written to the diagnostic listener
|
||||
Thread.Sleep(1000);
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(listener.EndRequest?.HttpContext);
|
||||
Assert.Null(listener.HostingUnhandledException?.HttpContext);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using System.Diagnostics;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.AspNet.Http;
|
||||
|
|
@ -354,6 +355,9 @@ namespace Microsoft.AspNet.Diagnostics
|
|||
// Act
|
||||
await server.CreateClient().GetAsync(string.Empty);
|
||||
|
||||
// This ensures that all diagnostics are completely written to the diagnostic listener
|
||||
Thread.Sleep(1000);
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(listener.EndRequest?.HttpContext);
|
||||
Assert.Null(listener.HostingUnhandledException?.HttpContext);
|
||||
|
|
|
|||
Loading…
Reference in New Issue