summaryrefslogtreecommitdiff
path: root/watcher_test.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-05-03 13:28:49 +0300
committerWolfy-J <[email protected]>2019-05-03 13:28:49 +0300
commit46519d2a383c9564007e1d2a6beb492988f8c6c9 (patch)
tree5d0e8a1d60bff08b86d425bc71ed02a47884e92b /watcher_test.go
parentece33086ee1dfbf82e10665165054f6d7d2af1ed (diff)
empty static pool
Diffstat (limited to 'watcher_test.go')
-rw-r--r--watcher_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/watcher_test.go b/watcher_test.go
index 4a46eaf1..94ac591e 100644
--- a/watcher_test.go
+++ b/watcher_test.go
@@ -168,6 +168,9 @@ func Test_RemoveWorkerOnAllocation(t *testing.T) {
assert.NotEqual(t, lastPid, res.String())
assert.NotEqual(t, StateReady, wr.state.Value())
+
+ _, ok := rr.pool.(*StaticPool).remove.Load(wr)
+ assert.False(t, ok)
}
func Test_RemoveWorkerAfterTask(t *testing.T) {
@@ -207,4 +210,7 @@ func Test_RemoveWorkerAfterTask(t *testing.T) {
// must be replaced
assert.NotEqual(t, lastPid, fmt.Sprintf("%v", rr.Workers()[0]))
+
+ // must not be registered withing pool
+ rr.pWatcher.(*eWatcher).remove(wr, nil)
}