Fix order of streaming WebSocket test
parent
fc574ac209
commit
9dc59ebc73
|
@ -10,20 +10,6 @@ import (
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStreamingWSPublic(t *testing.T) {
|
|
||||||
ts := httptest.NewServer(http.HandlerFunc(wsMock))
|
|
||||||
defer ts.Close()
|
|
||||||
|
|
||||||
client := NewClient(&Config{Server: ts.URL}).NewWSClient()
|
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
|
||||||
q, err := client.StreamingWSPublic(ctx, false)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("should not be fail: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
wsTest(t, q, cancel)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestStreamingWSUser(t *testing.T) {
|
func TestStreamingWSUser(t *testing.T) {
|
||||||
ts := httptest.NewServer(http.HandlerFunc(wsMock))
|
ts := httptest.NewServer(http.HandlerFunc(wsMock))
|
||||||
defer ts.Close()
|
defer ts.Close()
|
||||||
|
@ -38,6 +24,20 @@ func TestStreamingWSUser(t *testing.T) {
|
||||||
wsTest(t, q, cancel)
|
wsTest(t, q, cancel)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestStreamingWSPublic(t *testing.T) {
|
||||||
|
ts := httptest.NewServer(http.HandlerFunc(wsMock))
|
||||||
|
defer ts.Close()
|
||||||
|
|
||||||
|
client := NewClient(&Config{Server: ts.URL}).NewWSClient()
|
||||||
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
|
q, err := client.StreamingWSPublic(ctx, false)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("should not be fail: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
wsTest(t, q, cancel)
|
||||||
|
}
|
||||||
|
|
||||||
func TestStreamingWSHashtag(t *testing.T) {
|
func TestStreamingWSHashtag(t *testing.T) {
|
||||||
ts := httptest.NewServer(http.HandlerFunc(wsMock))
|
ts := httptest.NewServer(http.HandlerFunc(wsMock))
|
||||||
defer ts.Close()
|
defer ts.Close()
|
||||||
|
|
Loading…
Reference in New Issue