Skip to content

Commit aa508d2

Browse files
committed
cleanup: remove unused expectEvent helper from WS endpoint tests
1 parent 51c58e1 commit aa508d2

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

v2/futures/websocket_endpoints_test.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,6 @@ func requireKeys(t *testing.T) {
2323
}
2424
}
2525

26-
// expectEvent connects a WS stream and waits up to timeout for at least one event.
27-
func expectEvent(t *testing.T, label string, doneC, stopC chan struct{}, err error, timeout time.Duration) {
28-
t.Helper()
29-
if err != nil {
30-
t.Fatalf("[%s] connect error: %v", label, err)
31-
}
32-
defer close(stopC)
33-
select {
34-
case <-doneC:
35-
t.Fatalf("[%s] connection closed before receiving data", label)
36-
case <-time.After(timeout):
37-
t.Fatalf("[%s] timeout after %s", label, timeout)
38-
}
39-
}
40-
4126
// --- Demo environment tests ---
4227

4328
func TestWsEndpoints_Demo_Market_AggTrade(t *testing.T) {

0 commit comments

Comments
 (0)