From 5a6236ecfec32eb03c7e6049a167e65afc9c698b Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Mon, 4 Apr 2016 23:05:16 +0800 Subject: [PATCH] update test server listen on same port. Signed-off-by: Bo-Yi Wu --- gorush/server_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gorush/server_test.go b/gorush/server_test.go index 2313d04..ae80b5a 100644 --- a/gorush/server_test.go +++ b/gorush/server_test.go @@ -28,8 +28,6 @@ func TestRunNormalServer(t *testing.T) { gin.SetMode(gin.TestMode) - router := gin.New() - go func() { assert.NoError(t, RunHTTPServer()) }() @@ -37,7 +35,7 @@ func TestRunNormalServer(t *testing.T) { // otherwise the main thread will complete time.Sleep(5 * time.Millisecond) - assert.Error(t, router.Run(":8088")) + assert.Error(t, RunHTTPServer()) gofight.TestRequest(t, "http://localhost:8088/api/status") }