Skip to content

Intermittent pass in /websockets/cookies/005.html #9772

Closed

Description

@nox
  ▶ Unexpected subtest result in /websockets/cookies/005.html:
  └ PASS [expected FAIL] WebSockets: setting HttpOnly cookies in ws response, checking ws request

Activity

  1. added
    I-intermittent
    on Feb 26, 2016
  2. added a commit that references this issue on Feb 29, 2016
  3. bobthekingofegypt commented on Apr 4, 2016

    @bobthekingofegypt
    Contributor

    cc @jdm

    I've taken a look at this test to see if it could be enabled again after the work on fixing the timeouts.

    I have a few concerns about this test case and feel we should maybe change it a bit, but I'm assuming it is working for other browsers. What is the process for changing the functionality of a test case?

    I'll break down my concerns about the test, hopefully some of it makes sense.

    1. It attempts to circumvent the pywebsocket handshake process by writing directly to the stream in set-cookie_http_wsh.py. This has a side effect in that after you write your handshake response the connection is upgraded to a websocket but then pywebsocket sends its own handshake response down the channel which seems to be interpreted as a close but it's not really a valid websocket message. This can be solved by using the extra_headers list in pywebsockets but this will only work if you are not overwriting required headers.

    2. If you fix the headers using the above extra_headers solution the test will still fail in servo. The problem is that the web_socket_transfer_data function in set-cookie_http_wsh.py is just returning straight away which tells pywebsocket to close the connection. In servo this will then trigger the script close event for the websocket that triggers an assert_unreached on the test. I imagine this is intermittent based on timing of thread execution. The ws.close() call in the test itself is a red-herring, the close is triggered by the server.

    This test also identified a flaw in my PR #10382. I need to check and update the guard in both the incoming and outgoing threads as I've missed the case when the server starts the close and then the user script calls close, which also causes an extra close to be sent. I'll update it tomorrow.

  4. jdm commented on Apr 4, 2016

    @jdm
    Member

    Funny you should mention point 1, since I filed web-platform-tests/wpt#2625 a couple months ago about the same issue.

  5. jdm commented on Apr 4, 2016

    @jdm
    Member

    As for updating the tests, for ones like this I like to modify them upstream in order to solicit feedback from people like zcorpan. Otherwise we area allowed to modify tests locally in Servo and the changes will be merged upstream automatically as part of our bidirectional synchronization process.

  6. added
    C-disabled
    on Apr 22, 2016
  7. mrobinson commented on May 23, 2025

    @mrobinson
    Member

    This test is no longer disabled, so likely isn't intermittent any longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-disabledI-intermittent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions