⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 278345 in webkit


Ignore:
Timestamp:
Jun 2, 2021, 2:07:34 AM (5 years ago)
Author:
youenn@apple.com
Message:

Fix race condition in binary_wsh.py
https://bugs.webkit.org/show_bug.cgi?id=226464
<rdar://77356905>

Reviewed by Alex Christensen.

The web socket server was implemented to send 4 messages as soon as connection is opened and close the connection.
The client expects to correctly send a message before the connection is closed.
This is not guaranteed by the web socket server, in case the server is very fast closing the connection and the client very slow at sending its message.
Given the focus of the test is to validate binary data, change the web socket server to remove the potential race.

  • http/tests/websocket/tests/hybi/inspector/binary_wsh.py:

(web_socket_transfer_data):

Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r278343 r278345  
     12021-06-02  Youenn Fablet  <youenn@apple.com>
     2
     3        Fix race condition in binary_wsh.py
     4        https://bugs.webkit.org/show_bug.cgi?id=226464
     5        <rdar://77356905>
     6
     7        Reviewed by Alex Christensen.
     8
     9        The web socket server was implemented to send 4 messages as soon as connection is opened and close the connection.
     10        The client expects to correctly send a message before the connection is closed.
     11        This is not guaranteed by the web socket server, in case the server is very fast closing the connection and the client very slow at sending its message.
     12        Given the focus of the test is to validate binary data, change the web socket server to remove the potential race.
     13
     14        * http/tests/websocket/tests/hybi/inspector/binary_wsh.py:
     15        (web_socket_transfer_data):
     16
    1172021-05-28  Antoine Quint  <graouts@webkit.org>
    218
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/inspector/binary_wsh.py

    r215388 r278345  
    22from mod_pywebsocket import stream
    33
     4from mod_pywebsocket import msgutil
    45
    56def web_socket_do_extra_handshake(request):
     
    89
    910def web_socket_transfer_data(request):
     11    # Make sure to receive a message from client before sending messages.
     12    client_message = msgutil.receive_message(request)
    1013    messages_to_send = ['Hello, world!', 'Привет, Мир!', '', all_distinct_bytes()]
    1114    for message in messages_to_send:
Note: See TracChangeset for help on using the changeset viewer.