summaryrefslogtreecommitdiff
path: root/sync_worker_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-27 11:19:27 +0300
committerGitHub <[email protected]>2020-11-27 11:19:27 +0300
commitb5020bfce6b5362400cb9b578fe32c1a6ed5d61a (patch)
tree902afaca9b225cfe9e3b498b97cc83dec13fcd9a /sync_worker_test.go
parent46ae5dcc22d971b0f909bce23ec8fdef26811ed6 (diff)
parent849a03b8ead6fe8e65ab1a1e5653a57c12502dd1 (diff)
Merge pull request #416 from spiral/feature/static_pool_triggerv2.0.0-alpha22
Add new pool event: EventNoFreeWorkers
Diffstat (limited to 'sync_worker_test.go')
-rwxr-xr-xsync_worker_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/sync_worker_test.go b/sync_worker_test.go
index 69e6ece9..9786d709 100755
--- a/sync_worker_test.go
+++ b/sync_worker_test.go
@@ -70,7 +70,7 @@ func Test_BadPayload(t *testing.T) {
assert.Nil(t, res.Body)
assert.Nil(t, res.Context)
- assert.Equal(t, "payload can not be empty", err.Error())
+ assert.Contains(t, err.Error(), "payload can not be empty")
}
func Test_NotStarted_String(t *testing.T) {
@@ -98,7 +98,7 @@ func Test_NotStarted_Exec(t *testing.T) {
assert.Nil(t, res.Body)
assert.Nil(t, res.Context)
- assert.Equal(t, "WorkerProcess is not ready (inactive)", err.Error())
+ assert.Contains(t, err.Error(), "WorkerProcess is not ready (inactive)")
}
func Test_String(t *testing.T) {
@@ -215,10 +215,10 @@ func Test_Error(t *testing.T) {
assert.Nil(t, res.Body)
assert.Nil(t, res.Context)
- if errors.Is(errors.Exec, err) == false {
- t.Fatal("error should be of type errors.Exec")
+ if errors.Is(errors.ErrSoftJob, err) == false {
+ t.Fatal("error should be of type errors.ErrSoftJob")
}
- assert.Contains(t, err.Error(), "exec payload: Exec: hello")
+ assert.Contains(t, err.Error(), "exec payload: SoftJobError: hello")
}
func Test_NumExecs(t *testing.T) {