Skip to content

[browser][websockets][tests] Tests for CloseDescription Max Length are failing #45531

Closed

Description

@kjpou1

There seems to be a max length verification for the websocket close description that browser is not checking for.

The tests are expecting an exception but the browser websocket implementation does not throw an exception.

 fail: [FAIL] System.Net.WebSockets.Client.Tests.CloseTest.CloseAsync_CloseDescriptionIsMaxLengthPlusOne_ThrowsArgumentException(server: ws://corefx-net-http11.azurewebsites.net/WebSocket/EchoWebSocket.ashx)
  info: Assert.Throws() Failure
  info: Expected: typeof(System.ArgumentException)
  info: Actual:   (No exception was thrown)
  info:    at System.AssertExtensions.Throws[ArgumentException](String expectedParamName, Action action)
  info:    at System.Net.WebSockets.Client.Tests.CloseTest.CloseAsync_CloseDescriptionIsMaxLengthPlusOne_ThrowsArgumentException(Uri server)
  info: --- End of stack trace from previous location ---

See #45470 for tests

Activity

  1. added
    arch-wasm
    on Dec 3, 2020
  2. self-assigned this
    on Dec 3, 2020
  3. added
    untriaged
    on Dec 3, 2020
  4. removed
    untriaged
    on Dec 3, 2020
  5. kjpou1 commented on Dec 3, 2020

    @kjpou1
    ContributorAuthor

    The validation is there but the exception is not be propagated to the unit test https://github.com/dotnet/runtime/blob/master/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs#L460

    update:

      info: WASM-ERR: We are in ValidateCloseStatus 124 / max 123
      info: WASM-ERR: We should throw in ValidateCloseStatus 124 / max 123
      info: WASM-ERR: We are in ValidateCloseStatus 124 / max 123
      info: WASM-ERR: We should throw in ValidateCloseStatus 124 / max 123
    
    
  6. added this to the 6.0.0 milestone on Jan 26, 2021
  7. ghost locked as resolved and limited conversation to collaborators on Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-System.Net

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions