websocket-kit icon indicating copy to clipboard operation
websocket-kit copied to clipboard

Fix Failing Tests, Address Client Connection Issue

Open jhoughjr opened this issue 1 year ago • 6 comments

Updated from swift-tools-version:5.7 to 5.9. This fixes an issue where clients would get a bad Sec-WebSocket-Accept value from vapor.

Fixed bad url tests on WebSocket, Async and regular.

There is an issue for covering all bad urls that the WebSocket might reject as URL seems to init fragments such as bare escape sequences. I'm not sure yet how that could be covered better, or how important it is.

jhoughjr avatar Nov 22 '24 14:11 jhoughjr

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.85%. Comparing base (a935b63) to head (2859454). Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #155   +/-   ##
=======================================
  Coverage   82.85%   82.85%           
=======================================
  Files           6        6           
  Lines         659      659           
=======================================
  Hits          546      546           
  Misses        113      113           
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Nov 22 '24 14:11 codecov[bot]

The semantics of URL's validation changed noticeably in Swift 6.0, hence the CI failure.

gwynne avatar Nov 22 '24 15:11 gwynne

We really shouldn't be touching BoringSSL anymore

0xTim avatar Nov 22 '24 16:11 0xTim

We really shouldn't be touching BoringSSL anymore

Yeah, but that's out of scope for this PR.

gwynne avatar Nov 22 '24 16:11 gwynne

Ill check these tests and update.

jhoughjr avatar Nov 22 '24 16:11 jhoughjr

Im beginning to think there is no way to resolve this issue with this test. The behavior is not consistent enough across swift versions and platforms. The utility of the test is unknown to me also.

I don't know how to even do it (much less elegantly), to handle URL initialization across versions and platforms. I'd also argue this is kinda testing URL and we don't own that. idk im not of much use.

jhoughjr avatar Nov 22 '24 23:11 jhoughjr