update test server listen on same port.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-04-04 23:05:16 +08:00
parent 81da87a137
commit 5a6236ecfe
1 changed files with 1 additions and 3 deletions

View File

@ -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")
}