diff options
author | Valery Piashchynski <[email protected]> | 2020-10-19 14:01:59 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-10-19 14:01:59 +0300 |
commit | 77670fb7af0c892c9b3a589fd424534fad288e7a (patch) | |
tree | 3adcaa85db664a355abe2b28f1d7e4a3fc45689f /sync_worker_test.go | |
parent | 16fbf3104c3c34bd9355593052b686acd26a8efe (diff) |
Update according activity worker
Diffstat (limited to 'sync_worker_test.go')
-rw-r--r-- | sync_worker_test.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sync_worker_test.go b/sync_worker_test.go index e1cec4b6..f4868009 100644 --- a/sync_worker_test.go +++ b/sync_worker_test.go @@ -34,7 +34,7 @@ func Test_Echo(t *testing.T) { } }() - res, err := syncWorker.Exec(ctx, Payload{Body: []byte("hello")}) + res, err := syncWorker.ExecWithContext(ctx, Payload{Body: []byte("hello")}) assert.Nil(t, err) assert.NotNil(t, res) @@ -65,7 +65,7 @@ func Test_BadPayload(t *testing.T) { } }() - res, err := syncWorker.Exec(ctx, EmptyPayload) + res, err := syncWorker.ExecWithContext(ctx, EmptyPayload) assert.Error(t, err) assert.Nil(t, res.Body) @@ -94,7 +94,7 @@ func Test_NotStarted_Exec(t *testing.T) { t.Fatal(err) } - res, err := syncWorker.Exec(ctx, Payload{Body: []byte("hello")}) + res, err := syncWorker.ExecWithContext(ctx, Payload{Body: []byte("hello")}) assert.Error(t, err) assert.Nil(t, res.Body) @@ -143,7 +143,7 @@ func Test_Echo_Slow(t *testing.T) { t.Fatal(err) } - res, err := syncWorker.Exec(ctx, Payload{Body: []byte("hello")}) + res, err := syncWorker.ExecWithContext(ctx, Payload{Body: []byte("hello")}) assert.Nil(t, err) assert.NotNil(t, res) @@ -185,7 +185,7 @@ func Test_Broken(t *testing.T) { t.Fatal(err) } - res, err := syncWorker.Exec(ctx, Payload{Body: []byte("hello")}) + res, err := syncWorker.ExecWithContext(ctx, Payload{Body: []byte("hello")}) assert.NotNil(t, err) assert.Nil(t, res.Body) assert.Nil(t, res.Context) @@ -215,7 +215,7 @@ func Test_Error(t *testing.T) { t.Fatal(err) } - res, err := syncWorker.Exec(ctx, Payload{Body: []byte("hello")}) + res, err := syncWorker.ExecWithContext(ctx, Payload{Body: []byte("hello")}) assert.NotNil(t, err) assert.Nil(t, res.Body) assert.Nil(t, res.Context) @@ -244,19 +244,19 @@ func Test_NumExecs(t *testing.T) { t.Fatal(err) } - _, err = syncWorker.Exec(ctx, Payload{Body: []byte("hello")}) + _, err = syncWorker.ExecWithContext(ctx, Payload{Body: []byte("hello")}) if err != nil { t.Errorf("fail to execute payload: error %v", err) } assert.Equal(t, int64(1), w.State().NumExecs()) - _, err = syncWorker.Exec(ctx, Payload{Body: []byte("hello")}) + _, err = syncWorker.ExecWithContext(ctx, Payload{Body: []byte("hello")}) if err != nil { t.Errorf("fail to execute payload: error %v", err) } assert.Equal(t, int64(2), w.State().NumExecs()) - _, err = syncWorker.Exec(ctx, Payload{Body: []byte("hello")}) + _, err = syncWorker.ExecWithContext(ctx, Payload{Body: []byte("hello")}) if err != nil { t.Errorf("fail to execute payload: error %v", err) } |