ksysoev / wasabi

Toolkit for Creating WebSocket API Gateways
MIT License
4 stars 2 forks source link

Improve server_test #59

Closed KianYang-Lee closed 1 month ago

KianYang-Lee commented 1 month ago

Current server_test package contains test that relies on time.Sleep to wait server to be ready for accepting connection. Hope to refactor these test to use the ready channel of server for better readability. I can open a PR to refactor these tests

ksysoev commented 1 month ago

@KianYang-Lee could you give a link to test you mean, I see only protection selects that help us to not wait forever on a signal and fail test faster

KianYang-Lee commented 1 month ago

@ksysoev for example this https://github.com/ksysoev/wasabi/blob/main/server/server_test.go#L85-L117 . We can just wait on ready chan . Makes for better readability

KianYang-Lee commented 1 month ago

let me make a PR and you can see better

ksysoev commented 1 month ago

implemented in #62