Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh network tests server code to Kestrel #52642

Merged
merged 4 commits into from
May 13, 2021

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented May 12, 2021

This brings davidsh's corefx-net-endpoint into runtime repository.
It's almost 1:1 copy, with minor changes

This new server doesn't cover full scope of the obsolete server. I created #52693 to describe the gaps I know about.

This makes it possible to hosts this server as Kestrel middleware also inside of xharness process in order to improve #42852

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented May 12, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Preparation for hosting this server also in xharness process in order to improve #42852

Author: pavelsavara
Assignees: -
Labels:

area-System.Net

Milestone: -

@ghost
Copy link

ghost commented May 12, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Preparation for hosting this server also in xharness process in order to improve #42852

Author: pavelsavara
Assignees: -
Labels:

area-System.Net, area-System.Net.Http

Milestone: -

@pavelsavara pavelsavara changed the title Refresh network tests Refresh network tests server code to Kestrel May 12, 2021
@pavelsavara pavelsavara marked this pull request as ready for review May 12, 2021 14:05
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;

namespace NetCoreServer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is best name since .NET Core become just .NET in 5.0.
Since this is purely related to testing perhaps the name can reflect that.

Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks ok to me. The name space seems odd but it seems like it was inherited from the original code.


if (context.Request.QueryString.HasValue && context.Request.QueryString.Value.Contains("delay10sec"))
{
Thread.Sleep(10000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

await Task.Delay() ? since this is async function? I assume this is copy of original, code right?

}
catch (Exception)
{
// We might want to log these exceptions. But for now we ignore them.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That may be hard for Azure service but perhaps simple print would be still beneficial. Unless there is easy way how to emit Kestrel error message.

@pavelsavara pavelsavara merged commit 509ed7a into dotnet:main May 13, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2021
@pavelsavara pavelsavara deleted the pr_move_network_test_server branch July 29, 2021 08:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants