summaryrefslogtreecommitdiff
path: root/pool_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pool_test.go')
-rw-r--r--pool_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/pool_test.go b/pool_test.go
index 9d9bcca8..8b936059 100644
--- a/pool_test.go
+++ b/pool_test.go
@@ -72,7 +72,7 @@ func Test_Pool_Echo(t *testing.T) {
assert.NoError(t, err)
assert.NotNil(t, res)
assert.NotNil(t, res.Body)
- assert.Nil(t, res.Head)
+ assert.Nil(t, res.Context)
assert.Equal(t, "hello", res.String())
}
@@ -88,12 +88,12 @@ func Test_Pool_Echo_NilHead(t *testing.T) {
assert.NotNil(t, p)
assert.NoError(t, err)
- res, err := p.Exec(&Payload{Body: []byte("hello"), Head: nil})
+ res, err := p.Exec(&Payload{Body: []byte("hello"), Context: nil})
assert.NoError(t, err)
assert.NotNil(t, res)
assert.NotNil(t, res.Body)
- assert.Nil(t, res.Head)
+ assert.Nil(t, res.Context)
assert.Equal(t, "hello", res.String())
}
@@ -109,14 +109,14 @@ func Test_Pool_Echo_Head(t *testing.T) {
assert.NotNil(t, p)
assert.NoError(t, err)
- res, err := p.Exec(&Payload{Body: []byte("hello"), Head: []byte("world")})
+ res, err := p.Exec(&Payload{Body: []byte("hello"), Context: []byte("world")})
assert.NoError(t, err)
assert.NotNil(t, res)
assert.Nil(t, res.Body)
- assert.NotNil(t, res.Head)
+ assert.NotNil(t, res.Context)
- assert.Equal(t, "world", string(res.Head))
+ assert.Equal(t, "world", string(res.Context))
}
func Test_Pool_JobError(t *testing.T) {
@@ -218,7 +218,7 @@ func Test_Pool_Replace_Worker(t *testing.T) {
assert.NoError(t, err)
assert.NotNil(t, res)
assert.NotNil(t, res.Body)
- assert.Nil(t, res.Head)
+ assert.Nil(t, res.Context)
assert.NotEqual(t, lastPID, string(res.Body))
lastPID = string(res.Body)
@@ -253,7 +253,7 @@ func Test_Pool_Stop_Worker(t *testing.T) {
assert.NoError(t, err)
assert.NotNil(t, res)
assert.NotNil(t, res.Body)
- assert.Nil(t, res.Head)
+ assert.Nil(t, res.Context)
assert.NotEqual(t, lastPID, string(res.Body))
lastPID = string(res.Body)