From 9dc59ebc73d17744bcb5e5586044542b26e7fa96 Mon Sep 17 00:00:00 2001 From: 178inaba <178inaba@users.noreply.github.com> Date: Sun, 30 Apr 2017 22:16:50 +0900 Subject: [PATCH] Fix order of streaming WebSocket test --- streaming_ws_test.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/streaming_ws_test.go b/streaming_ws_test.go index 6ec5608..f52477c 100644 --- a/streaming_ws_test.go +++ b/streaming_ws_test.go @@ -10,20 +10,6 @@ import ( "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) { ts := httptest.NewServer(http.HandlerFunc(wsMock)) defer ts.Close() @@ -38,6 +24,20 @@ func TestStreamingWSUser(t *testing.T) { 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) { ts := httptest.NewServer(http.HandlerFunc(wsMock)) defer ts.Close()