Skip to content

Commit

Permalink
Enable IIS connection: close test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tratcher committed May 11, 2015
1 parent a5daae3 commit eaecffb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions test/ServerComparison.FunctionalTests/ResponseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public Task ResponseFormats_Kestrel_ContentLength(ServerType serverType, Runtime
return ResponseFormats(serverType, runtimeFlavor, architecture, applicationBaseUrl, CheckContentLengthAsync);
}

// [ConditionalTheory]
// [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
// TODO: Not supported [InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")]
[ConditionalTheory]
[OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)]
[InlineData(ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x86, "http://localhost:5071/")]
// https://github.com/aspnet/Helios/issues/148
// TODO: Chunks anyways [InlineData(ServerType.WebListener, RuntimeFlavor.Clr, RuntimeArchitecture.x86, "http://localhost:5073/")]
// https://github.com/aspnet/WebListener/issues/113
Expand Down Expand Up @@ -155,8 +155,8 @@ private static async Task CheckConnectionCloseAsync(HttpClient client, ILogger l
var response = await client.GetAsync("connectionclose");
responseText = await response.Content.ReadAsStringAsync();
Assert.Equal("Connnection Close", responseText);
Assert.Null(response.Headers.TransferEncodingChunked);
Assert.True(response.Headers.ConnectionClose, "/connectionclose, closed?");
Assert.Null(response.Headers.TransferEncodingChunked);
Assert.Null(GetContentLength(response));
}
catch (XunitException)
Expand Down
5 changes: 3 additions & 2 deletions test/ServerComparison.TestSites/StartupResponses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)

app.Map("/connectionclose", subApp =>
{
subApp.Run(context =>
subApp.Run(async context =>
{
context.Response.Headers[HeaderNames.Connection] = "close";
return context.Response.WriteAsync("Connnection Close");
await context.Response.WriteAsync("Connnection Close");
await context.Response.Body.FlushAsync(); // Bypass IIS write-behind buffering
});
});

Expand Down

0 comments on commit eaecffb

Please sign in to comment.