From f6063d06d3a381036abd672dfbb799d777455fb0 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Mon, 14 Dec 2020 13:54:44 +0300 Subject: fix tests issues --- static_pool_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'static_pool_test.go') diff --git a/static_pool_test.go b/static_pool_test.go index 747f26c4..33799c40 100755 --- a/static_pool_test.go +++ b/static_pool_test.go @@ -82,7 +82,7 @@ func Test_StaticPool_Echo(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, res) assert.NotNil(t, res.Body) - assert.Nil(t, res.Context) + assert.Empty(t, res.Context) assert.Equal(t, "hello", res.String()) } @@ -106,7 +106,7 @@ func Test_StaticPool_Echo_NilContext(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, res) assert.NotNil(t, res.Body) - assert.Nil(t, res.Context) + assert.Empty(t, res.Context) assert.Equal(t, "hello", res.String()) } @@ -129,7 +129,7 @@ func Test_StaticPool_Echo_Context(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, res) - assert.Nil(t, res.Body) + assert.Empty(t, res.Body) assert.NotNil(t, res.Context) assert.Equal(t, "world", string(res.Context)) @@ -214,7 +214,7 @@ func Test_StaticPool_Broken_FromOutside(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, res) assert.NotNil(t, res.Body) - assert.Nil(t, res.Context) + assert.Empty(t, res.Context) assert.Equal(t, "hello", res.String()) assert.Equal(t, runtime.NumCPU(), len(p.Workers())) @@ -293,7 +293,7 @@ func Test_StaticPool_Replace_Worker(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, res) assert.NotNil(t, res.Body) - assert.Nil(t, res.Context) + assert.Empty(t, res.Context) assert.NotEqual(t, lastPID, string(res.Body)) lastPID = string(res.Body) @@ -332,7 +332,7 @@ func Test_StaticPool_Debug_Worker(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, res) assert.NotNil(t, res.Body) - assert.Nil(t, res.Context) + assert.Empty(t, res.Context) assert.NotEqual(t, lastPID, string(res.Body)) lastPID = string(res.Body) @@ -372,7 +372,7 @@ func Test_StaticPool_Stop_Worker(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, res) assert.NotNil(t, res.Body) - assert.Nil(t, res.Context) + assert.Empty(t, res.Context) assert.NotEqual(t, lastPID, string(res.Body)) lastPID = string(res.Body) -- cgit v1.2.3