From e09931dcf7d70e786e15ab51872667e416788a20 Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Sat, 26 Sep 2020 20:36:52 +0800 Subject: [PATCH] Chore: remove broken test temporarily --- component/pool/pool_test.go | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/component/pool/pool_test.go b/component/pool/pool_test.go index 6fc8622d..f03a1c9b 100644 --- a/component/pool/pool_test.go +++ b/component/pool/pool_test.go @@ -2,7 +2,6 @@ package pool import ( "context" - "runtime" "testing" "time" @@ -72,26 +71,3 @@ func TestPool_MaxAge(t *testing.T) { elm, _ = pool.Get() assert.Equal(t, 1, elm.(int)) } - -func TestPool_AutoGC(t *testing.T) { - g := lg() - - sign := make(chan int) - pool := New(g, WithEvict(func(item interface{}) { - sign <- item.(int) - })) - - elm, _ := pool.Get() - assert.Equal(t, 0, elm.(int)) - pool.Put(2) - pool = nil - - runtime.GC() - - select { - case num := <-sign: - assert.Equal(t, 2, num) - case <-time.After(time.Second * 3): - assert.Fail(t, "something wrong") - } -}