Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Merge pull request #16243 from dotnet/revert-16199-release/1.1.0
Browse files Browse the repository at this point in the history
Revert "Update AspNetCoreHosting keyword"
  • Loading branch information
vancem committed Feb 16, 2017
2 parents 0c2ff97 + 8d774a8 commit dbf6aa0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ public class Keywords
"httpContext.Request.Path;" +
"httpContext.Request.QueryString" +
"\n" +
"Microsoft.AspNetCore/Microsoft.AspNetCore.Hosting.EndRequest@Activity1Stop:-" +
"httpContext.TraceIdentifier;" +
"httpContext.Response.StatusCode";
"Microsoft.AspNetCore/Microsoft.AspNetCore.Hosting.EndRequest@Activity1Stop:-";

// Setting EntityFrameworkCoreCommands is like having this in the FilterAndPayloadSpecs string
// It turns on basic SQL commands.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,25 +586,11 @@ public void TestShortcutKeywords()
eventSourceListener.ResetEventCountAndLastEvent();

// Stop the ASP.NET reqeust.
aspNetCoreSource.Write("Microsoft.AspNetCore.Hosting.EndRequest",
new
{
httpContext = new
{
Response = new
{
StatusCode = "200"
},
TraceIdentifier = "MyTraceId"
}
});
aspNetCoreSource.Write("Microsoft.AspNetCore.Hosting.EndRequest", null);
Assert.Equal(1, eventSourceListener.EventCount); // Exactly one more event has been emitted.
Assert.Equal("Activity1Stop", eventSourceListener.LastEvent.EventSourceEventName);
Assert.Equal("Microsoft.AspNetCore", eventSourceListener.LastEvent.SourceName);
Assert.Equal("Microsoft.AspNetCore.Hosting.EndRequest", eventSourceListener.LastEvent.EventName);
Assert.True(2 <= eventSourceListener.LastEvent.Arguments.Count);
Assert.Equal("MyTraceId", eventSourceListener.LastEvent.Arguments["TraceIdentifier"]);
Assert.Equal("200", eventSourceListener.LastEvent.Arguments["StatusCode"]);
eventSourceListener.ResetEventCountAndLastEvent();
}
}
Expand Down

0 comments on commit dbf6aa0

Please sign in to comment.