Skip to content

Commit 5fbaafd

Browse files
committed
tests: remove unwanted tests from pool
1 parent f4250b8 commit 5fbaafd

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

pkg/worker/pool_test.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -196,28 +196,3 @@ func TestPool_Metrics(t *testing.T) {
196196
assert.Equal(t, uint64(2), snap.TasksDropped)
197197
}
198198

199-
func TestPool_SubmitRecoverPanic(t *testing.T) {
200-
t.Run("recover from closed channel", func(t *testing.T) {
201-
wp, _ := NewPool(&Config{Executor: &poolTestExecutor{}})
202-
pool := wp.(*workerPool)
203-
204-
// close the buffer to trigger panic on send
205-
close(pool.workerTaskBuffer)
206-
207-
err := wp.Submit(context.Background(), &core.Request{}, "cb", nil)
208-
assert.Error(t, err)
209-
assert.Equal(t, ErrPoolClosed, err)
210-
})
211-
212-
t.Run("do not recover from other panics", func(t *testing.T) {
213-
wp, _ := NewPool(&Config{Executor: &poolTestExecutor{}})
214-
pool := wp.(*workerPool)
215-
216-
// set autoscaler to nil to trigger nil pointer panic in Submit
217-
pool.autoscaler = nil
218-
219-
assert.Panics(t, func() {
220-
_ = wp.Submit(context.Background(), &core.Request{}, "cb", nil)
221-
})
222-
})
223-
}

0 commit comments

Comments
 (0)