Skip to content

[WIP][wasm][testing] remote loop network tests via xharness and websocket - #54289

Merged
pavelsavara merged 12 commits into
dotnet:mainfrom
pavelsavara:pr_wasm_network_test_remote_loop
Jun 22, 2021
Merged

[WIP][wasm][testing] remote loop network tests via xharness and websocket#54289
pavelsavara merged 12 commits into
dotnet:mainfrom
pavelsavara:pr_wasm_network_test_remote_loop

Conversation

@pavelsavara

@pavelsavara pavelsavara commented Jun 16, 2021

Copy link
Copy Markdown
Member

Make it possible to run LoopbackServer tests with WASM

via moving the listening socket out of WASM process into xharness process and forwarding it via WebSockets
Contributes to #42852

  • conditional compilation of LoopbackServer via #if TARGET_BROWSER
  • minimal implementation of WebSocketStream for the unit tests
  • simple SocketWrapper class to abstract Socket and WebSocket close/dispose/shutdown
  • added handling of CORS headers and pre-flight requests as necessary for browser HTTP client

xharness

  • new xharness web server middleware
  • adding it to helix payload

tests

@ghost

ghost commented Jun 16, 2021

Copy link
Copy Markdown

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

Issue Details

Make it possible to run LoopbackServer tests with WASM

via moving the listening socket out of WASM process into xharness process and forwarding it via WebSockets

  • conditional compilation of LoopbackServer via #if TARGET_BROWSER
  • minimal implementation of WebSocketStream for the unit tests
  • simple SocketWrapper class to abstract Socket and WebSocket close/dispose/shutdown
  • added handlind of CORS headers and pre-flight requests as necessary

xharness

  • new xharness web server middleware
  • adding it to helix payload

tests

  • many tests enabled for WASM
  • better categorization of tests originally under 42852, 34690
  • new active issues 54153,37669,54156,54270,54160,53876,54163 for pending problems
Author: pavelsavara
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@pavelsavara

Copy link
Copy Markdown
Member Author

/azp run runtime

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Jun 17, 2021
@ghost

ghost commented Jun 17, 2021

Copy link
Copy Markdown

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Make it possible to run LoopbackServer tests with WASM

via moving the listening socket out of WASM process into xharness process and forwarding it via WebSockets

  • conditional compilation of LoopbackServer via #if TARGET_BROWSER
  • minimal implementation of WebSocketStream for the unit tests
  • simple SocketWrapper class to abstract Socket and WebSocket close/dispose/shutdown
  • added handlind of CORS headers and pre-flight requests as necessary for browser HTTP client

xharness

  • new xharness web server middleware
  • adding it to helix payload

tests

Author: pavelsavara
Assignees: -
Labels:

arch-wasm, area-System.Net.Http

Milestone: -

@pavelsavara

Copy link
Copy Markdown
Member Author

/azp run runtime-libraries-mono outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara

Copy link
Copy Markdown
Member Author

/azp run runtime-libraries-mono outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@pavelsavara

Copy link
Copy Markdown
Member Author

Failed System.Drawing.Common.Tests is Timeout. All the failed tests in mono outer loop are unrelated and pre-existing.

@wfurt wfurt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Generally looks good to me.
I'm not sure I like the SocketWrapper name but I did not come up with anything better.
Long run we may add the CORS headers where needed to avoid fork for Browser.

cc: @dotnet/ncl @stephentoub for visibility.

Comment thread src/libraries/Common/tests/System/Net/Configuration.Http.cs Outdated

@ManickaP ManickaP left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, some minor comments, thanks.

Comment thread src/libraries/Common/tests/System/Net/Configuration.Http.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/GenericLoopbackServer.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/GenericLoopbackServer.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/GenericLoopbackServer.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs Outdated
- conditional compilation of LoopbackServer via #if TARGET_BROWSER
- minimal implementation of WebSocketStream for the unit tests
- simple SocketWrapper class to abstract Socket and WebSocket close/dispose/shutdown
- added handlind of CORS headers and pre-flight requests as necessary

- new xharness web server middleware
- adding it to helix payload

- better categorization of tests originally under 42852, 34690
- new active issues 54153,37669,54156,54270,54160,53876,54163
@pavelsavara
pavelsavara force-pushed the pr_wasm_network_test_remote_loop branch from c3bdadd to 42ad7fb Compare June 21, 2021 14:56

@radical radical left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just some nits, and questions. Nothing to block this over.

Comment thread src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs
Comment thread src/libraries/Common/tests/System/Net/WebSockets/WebSocketStream.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/WebSockets/WebSocketStream.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/WebSockets/WebSocketStream.cs Outdated
@pavelsavara
pavelsavara merged commit fe89236 into dotnet:main Jun 22, 2021
@karelz karelz added this to the 6.0.0 milestone Jul 15, 2021
@pavelsavara
pavelsavara deleted the pr_wasm_network_test_remote_loop branch July 29, 2021 08:48
@ghost ghost locked as resolved and limited conversation to collaborators Aug 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-System.Net.Http

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants