You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2026/08/07 07:38:57 UTC
(skywalking-banyandb) branch main updated: Fix flaky pool discard test without relying on reuse (#1256)
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
The following commit(s) were added to refs/heads/main by this push:
new ae42840ec Fix flaky pool discard test without relying on reuse (#1256)
ae42840ec is described below
commit ae42840ec6c73623f85a906b7966ddd8e5609613
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Fri Aug 7 15:38:52 2026 +0800
Fix flaky pool discard test without relying on reuse (#1256)
---
pkg/pool/pool_test.go | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/pkg/pool/pool_test.go b/pkg/pool/pool_test.go
index 79fc97034..62f4b80be 100644
--- a/pkg/pool/pool_test.go
+++ b/pkg/pool/pool_test.go
@@ -36,12 +36,7 @@ func TestSyncedDiscardBalancesCheckoutWithoutPooling(t *testing.T) {
value := testPool.Get()
require.Nil(t, value)
require.Equal(t, 1, testPool.RefsCount())
- testPool.Put(new(int))
- require.Zero(t, testPool.RefsCount())
-
- reused := testPool.Get()
- require.NotNil(t, reused)
- testPool.Discard(reused)
+ testPool.Discard(new(int))
require.Zero(t, testPool.RefsCount())
require.Nil(t, testPool.Get(), "discarded objects must not be returned by the pool")