From 72be513b9f16ee46ac05aab21a18c7de0b47bc14 Mon Sep 17 00:00:00 2001 From: yangqiuhua <284751067@qq.com> Date: Thu, 16 May 2019 11:40:25 +0800 Subject: [PATCH] feat(gin,runserver): fix RunServer test --- gin_integration_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gin_integration_test.go b/gin_integration_test.go index a85d3540..40b6a5dd 100644 --- a/gin_integration_test.go +++ b/gin_integration_test.go @@ -60,14 +60,14 @@ func TestRunServer(t *testing.T) { service := &http.Server{} go func() { router.GET("/example", func(c *Context) { c.String(http.StatusOK, "it worked") }) - assert.NoError(t, router.RunServer(service),":8080") + assert.NoError(t, router.RunServer(service,":8090")) }() // have to wait for the goroutine to start and run the server // otherwise the main thread will complete time.Sleep(5 * time.Millisecond) - assert.Error(t, router.RunServer(service),":8080") - testRequest(t, "http://localhost:8080/example") + assert.Error(t, router.RunServer(service,":8090")) + testRequest(t, "http://localhost:8090/example") } func TestRunTLS(t *testing.T) {