From e594c7070aad609c4caeda760671aca00e638561 Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Tue, 5 Jun 2018 23:17:14 +0300 Subject: fixing controlled descruction --- worker_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'worker_test.go') diff --git a/worker_test.go b/worker_test.go index 362db1f6..cb88d797 100644 --- a/worker_test.go +++ b/worker_test.go @@ -13,6 +13,7 @@ func Test_GetState(t *testing.T) { w, err := NewPipeFactory().SpawnWorker(cmd) go func() { assert.NoError(t, w.Wait()) + assert.Equal(t, StateStopped, w.State().Value()) }() assert.NoError(t, err) @@ -20,7 +21,7 @@ func Test_GetState(t *testing.T) { assert.Equal(t, StateReady, w.State().Value()) w.Stop() - assert.Equal(t, StateStopped, w.State().Value()) + assert.Equal(t, StateStopping, w.State().Value()) } func Test_Echo(t *testing.T) { -- cgit v1.2.3