summaryrefslogtreecommitdiff
path: root/service/http/fcgi_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/http/fcgi_test.go')
-rw-r--r--service/http/fcgi_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/service/http/fcgi_test.go b/service/http/fcgi_test.go
index 0cfc6e41..e68b2e7f 100644
--- a/service/http/fcgi_test.go
+++ b/service/http/fcgi_test.go
@@ -37,8 +37,7 @@ func Test_FCGI_Service_Echo(t *testing.T) {
s.(*Service).Stop()
go func() { assert.NoError(t, c.Serve()) }()
- time.Sleep(time.Millisecond * 100)
- defer c.Stop()
+ time.Sleep(time.Second * 1)
fcgiConnFactory := gofast.SimpleConnFactory("tcp", "0.0.0.0:6082")
@@ -56,6 +55,7 @@ func Test_FCGI_Service_Echo(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, 201, w.Result().StatusCode)
assert.Equal(t, "WORLD", string(body))
+ c.Stop()
}
func Test_FCGI_Service_Request_Uri(t *testing.T) {
@@ -83,8 +83,7 @@ func Test_FCGI_Service_Request_Uri(t *testing.T) {
s.(*Service).Stop()
go func() { assert.NoError(t, c.Serve()) }()
- time.Sleep(time.Millisecond * 100)
- defer c.Stop()
+ time.Sleep(time.Second * 1)
fcgiConnFactory := gofast.SimpleConnFactory("tcp", "0.0.0.0:6083")
@@ -102,4 +101,5 @@ func Test_FCGI_Service_Request_Uri(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, 200, w.Result().StatusCode)
assert.Equal(t, "http://site.local/hello-world", string(body))
+ c.Stop()
}