diff options
author | Valery Piashchynski <[email protected]> | 2020-02-28 01:51:55 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-02-28 01:51:55 +0300 |
commit | 6dd2ea9f38003e9c2e7bb54da20fabbabdd696ed (patch) | |
tree | e0f933d6cf8bc2db252a41fa89240e52dfb74aed | |
parent | 4841b41b9a3b08a5c0f44d46c77d98fd6b4b88f5 (diff) |
Test_FCGI_Service update
-rw-r--r-- | service/http/fcgi_test.go | 6 | ||||
-rw-r--r-- | worker_test.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/service/http/fcgi_test.go b/service/http/fcgi_test.go index 808dedcf..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,7 +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) + time.Sleep(time.Second * 1) fcgiConnFactory := gofast.SimpleConnFactory("tcp", "0.0.0.0:6083") diff --git a/worker_test.go b/worker_test.go index 46eb5f7c..c21e67cb 100644 --- a/worker_test.go +++ b/worker_test.go @@ -171,7 +171,7 @@ func Test_Broken(t *testing.T) { assert.Error(t, err) assert.Contains(t, err.Error(), "undefined_function()") }() - + res, err := w.Exec(&Payload{Body: []byte("hello")}) assert.Nil(t, res) assert.NotNil(t, err) |