summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-10-27 19:35:10 +0300
committerValery Piashchynski <[email protected]>2021-10-27 19:35:10 +0300
commit15e6f474ef1340f4e93f213bab1cb9548e51a1e8 (patch)
tree8c18bbea5132afde6a375ddcad0ef2bee2366bb7
parent801aa5900ebafd6d1837c3bd49ce0d4bf6382735 (diff)
update tests
Signed-off-by: Valery Piashchynski <[email protected]>
-rw-r--r--pool/supervisor_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pool/supervisor_test.go b/pool/supervisor_test.go
index c3abf85e..9c0bfdaa 100644
--- a/pool/supervisor_test.go
+++ b/pool/supervisor_test.go
@@ -265,6 +265,11 @@ func TestSupervisedPool_IdleTTL_StateAfterTimeout(t *testing.T) {
assert.Empty(t, resp.Context)
time.Sleep(time.Second * 2)
+
+ if len(p.Workers()) < 1 {
+ t.Fatal("should be at least 1 worker")
+ return
+ }
// should be destroyed, state should be Ready, not Invalid
assert.NotEqual(t, pid, p.Workers()[0].Pid())
assert.Equal(t, int64(1), p.Workers()[0].State().Value())