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 2023/02/21 07:27:14 UTC

[skywalking-banyandb] branch goleak created (now 7af50df4)

This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a change to branch goleak
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git


      at 7af50df4 Add a timeout to all go leaking checkers

This branch includes the following new commits:

     new 7af50df4 Add a timeout to all go leaking checkers

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[skywalking-banyandb] 01/01: Add a timeout to all go leaking checkers

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch goleak
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git

commit 7af50df4fd757d569f7a5e51c5e03720f7735bdd
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Tue Feb 21 07:23:29 2023 +0000

    Add a timeout to all go leaking checkers
    
    Signed-off-by: Gao Hongtao <ha...@gmail.com>
---
 banyand/liaison/grpc/registry_test.go           | 2 +-
 banyand/measure/metadata_test.go                | 2 +-
 banyand/metadata/schema/checker_test.go         | 3 ++-
 banyand/stream/metadata_test.go                 | 2 +-
 test/integration/cold_query/query_suite_test.go | 2 +-
 test/integration/load/load_suite_test.go        | 2 +-
 test/integration/other/measure_test.go          | 2 +-
 test/integration/other/property_test.go         | 2 +-
 test/integration/other/tls_test.go              | 2 +-
 test/integration/query/query_suite_test.go      | 2 +-
 10 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/banyand/liaison/grpc/registry_test.go b/banyand/liaison/grpc/registry_test.go
index 52ef6363..cc48ce86 100644
--- a/banyand/liaison/grpc/registry_test.go
+++ b/banyand/liaison/grpc/registry_test.go
@@ -65,7 +65,7 @@ var _ = Describe("Registry", func() {
 	AfterEach(func() {
 		_ = conn.Close()
 		gracefulStop()
-		Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(goods))
+		Eventually(gleak.Goroutines, testflags.EventuallyTimeout).ShouldNot(gleak.HaveLeaked(goods))
 	})
 
 	It("manages the stream", func() {
diff --git a/banyand/measure/metadata_test.go b/banyand/measure/metadata_test.go
index 66c83c04..fdbada2f 100644
--- a/banyand/measure/metadata_test.go
+++ b/banyand/measure/metadata_test.go
@@ -43,7 +43,7 @@ var _ = Describe("Metadata", func() {
 
 	AfterEach(func() {
 		deferFn()
-		Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(goods))
+		Eventually(gleak.Goroutines, flags.EventuallyTimeout).ShouldNot(gleak.HaveLeaked(goods))
 	})
 
 	Context("Manage group", func() {
diff --git a/banyand/metadata/schema/checker_test.go b/banyand/metadata/schema/checker_test.go
index 86c05c16..2280d88c 100644
--- a/banyand/metadata/schema/checker_test.go
+++ b/banyand/metadata/schema/checker_test.go
@@ -27,6 +27,7 @@ import (
 	"google.golang.org/protobuf/types/known/timestamppb"
 
 	databasev1 "github.com/apache/skywalking-banyandb/api/proto/banyandb/database/v1"
+	"github.com/apache/skywalking-banyandb/pkg/test/flags"
 )
 
 func loadStream() *databasev1.Stream {
@@ -64,7 +65,7 @@ var _ = ginkgo.Describe("Utils", func() {
 		})
 
 		ginkgo.AfterEach(func() {
-			Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(goods))
+			Eventually(gleak.Goroutines, flags.EventuallyTimeout).ShouldNot(gleak.HaveLeaked(goods))
 		})
 
 		ginkgo.It("should be equal if nothing changed", func() {
diff --git a/banyand/stream/metadata_test.go b/banyand/stream/metadata_test.go
index 04b2260e..3377d556 100644
--- a/banyand/stream/metadata_test.go
+++ b/banyand/stream/metadata_test.go
@@ -43,7 +43,7 @@ var _ = Describe("Metadata", func() {
 
 	AfterEach(func() {
 		deferFn()
-		Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(goods))
+		Eventually(gleak.Goroutines, flags.EventuallyTimeout).ShouldNot(gleak.HaveLeaked(goods))
 	})
 
 	Context("Manage group", func() {
diff --git a/test/integration/cold_query/query_suite_test.go b/test/integration/cold_query/query_suite_test.go
index 580a3e18..04296ae4 100644
--- a/test/integration/cold_query/query_suite_test.go
+++ b/test/integration/cold_query/query_suite_test.go
@@ -102,5 +102,5 @@ var _ = SynchronizedAfterSuite(func() {
 	}
 }, func() {
 	deferFunc()
-	Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(goods))
+	Eventually(gleak.Goroutines, flags.EventuallyTimeout).ShouldNot(gleak.HaveLeaked(goods))
 })
diff --git a/test/integration/load/load_suite_test.go b/test/integration/load/load_suite_test.go
index eeff58ea..bcf7fcba 100644
--- a/test/integration/load/load_suite_test.go
+++ b/test/integration/load/load_suite_test.go
@@ -100,5 +100,5 @@ var _ = SynchronizedAfterSuite(func() {
 	}
 }, func() {
 	deferFunc()
-	Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(goods))
+	Eventually(gleak.Goroutines, flags.EventuallyTimeout).ShouldNot(gleak.HaveLeaked(goods))
 })
diff --git a/test/integration/other/measure_test.go b/test/integration/other/measure_test.go
index 997f1ea2..1df0b041 100644
--- a/test/integration/other/measure_test.go
+++ b/test/integration/other/measure_test.go
@@ -57,7 +57,7 @@ var _ = g.Describe("Query service_cpm_minute", func() {
 	g.AfterEach(func() {
 		gm.Expect(conn.Close()).To(gm.Succeed())
 		deferFn()
-		gm.Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(goods))
+		gm.Eventually(gleak.Goroutines, flags.EventuallyTimeout).ShouldNot(gleak.HaveLeaked(goods))
 	})
 	g.It("queries service_cpm_minute by id after updating", func() {
 		casesMeasureData.Write(conn, "service_cpm_minute", "sw_metric", "service_cpm_minute_data1.json", baseTime, interval)
diff --git a/test/integration/other/property_test.go b/test/integration/other/property_test.go
index 84de1c0e..d7ec7c66 100644
--- a/test/integration/other/property_test.go
+++ b/test/integration/other/property_test.go
@@ -59,7 +59,7 @@ var _ = Describe("Property application", func() {
 	AfterEach(func() {
 		Expect(conn.Close()).To(Succeed())
 		deferFn()
-		Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(goods))
+		Eventually(gleak.Goroutines, flags.EventuallyTimeout).ShouldNot(gleak.HaveLeaked(goods))
 	})
 	It("applies properties", func() {
 		md := &propertyv1.Metadata{
diff --git a/test/integration/other/tls_test.go b/test/integration/other/tls_test.go
index 789ce3db..9ae5e121 100644
--- a/test/integration/other/tls_test.go
+++ b/test/integration/other/tls_test.go
@@ -64,7 +64,7 @@ var _ = g.Describe("Query service_cpm_minute", func() {
 	g.AfterEach(func() {
 		gm.Expect(conn.Close()).To(gm.Succeed())
 		deferFn()
-		gm.Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(goods))
+		gm.Eventually(gleak.Goroutines, flags.EventuallyTimeout).ShouldNot(gleak.HaveLeaked(goods))
 	})
 	g.It("queries a tls server", func() {
 		gm.Eventually(func(innerGm gm.Gomega) {
diff --git a/test/integration/query/query_suite_test.go b/test/integration/query/query_suite_test.go
index 41f0b439..49bb25ce 100644
--- a/test/integration/query/query_suite_test.go
+++ b/test/integration/query/query_suite_test.go
@@ -104,5 +104,5 @@ var _ = SynchronizedAfterSuite(func() {
 	}
 }, func() {
 	deferFunc()
-	Eventually(gleak.Goroutines).ShouldNot(gleak.HaveLeaked(goods))
+	Eventually(gleak.Goroutines, flags.EventuallyTimeout).ShouldNot(gleak.HaveLeaked(goods))
 })