summaryrefslogtreecommitdiff
path: root/static_pool_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'static_pool_test.go')
-rw-r--r--static_pool_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/static_pool_test.go b/static_pool_test.go
index b264fa64..05650d17 100644
--- a/static_pool_test.go
+++ b/static_pool_test.go
@@ -219,7 +219,7 @@ func Test_StaticPool_AllocateTimeout(t *testing.T) {
Config{
NumWorkers: 1,
AllocateTimeout: time.Millisecond * 50,
- DestroyTimeout: time.Second,
+ DestroyTimeout: time.Second * 2,
},
)
if err != nil {
@@ -242,10 +242,10 @@ func Test_StaticPool_AllocateTimeout(t *testing.T) {
time.Sleep(time.Millisecond * 10)
_, err = p.Exec(&Payload{Body: []byte("10")})
- assert.Error(t, err)
- if err != nil {
- assert.Contains(t, err.Error(), "worker timeout")
+ if err == nil {
+ t.Fatal("Test_StaticPool_AllocateTimeout exec should raise error")
}
+ assert.Contains(t, err.Error(), "worker timeout")
<-done
p.Destroy()