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 04781f437 trying to fix flaky test running timeout (#998)
04781f437 is described below

commit 04781f437fd2006cc9f9b2c4bed5964be6959219
Author: mrproliu <[email protected]>
AuthorDate: Wed Mar 11 20:07:16 2026 +0800

    trying to fix flaky test running timeout (#998)
    
    * trying to fix flaky test running timeout
    
    * disable flaky test in pull request
    
    ---------
    
    Co-authored-by: Gao Hongtao <[email protected]>
---
 test/cases/init.go                                 |  4 ++--
 test/integration/standalone/inspect/common.go      | 24 +++++++++++-----------
 .../standalone/other/forced_ttl_cleanup_test.go    |  4 ++--
 .../standalone/query_ondisk/etcd/suite_test.go     |  2 +-
 .../standalone/query_ondisk/property/suite_test.go |  2 +-
 5 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/test/cases/init.go b/test/cases/init.go
index 677e994bf..f5b167200 100644
--- a/test/cases/init.go
+++ b/test/cases/init.go
@@ -131,13 +131,13 @@ func Initialize(addr string, now time.Time) {
                        },
                        DataFile: "service_cpm_minute_spec_order2.json",
                })
-       time.Sleep(5 * time.Second)
+       time.Sleep(2 * time.Second)
        // trace
        interval = 500 * time.Millisecond
        casestrace.WriteToGroup(conn, "sw", "test-trace-group", "sw", now, 
interval)
        casestrace.WriteToGroup(conn, "zipkin", "zipkinTrace", "zipkin", now, 
interval)
        casestrace.WriteToGroup(conn, "sw", "test-trace-updated", "sw_updated", 
now.Add(time.Minute), interval)
-       time.Sleep(5 * time.Second)
+       time.Sleep(2 * time.Second)
        casestrace.WriteToGroup(conn, "sw", "test-trace-group", 
"sw_mixed_traces", now.Add(time.Minute), interval)
        casestrace.WriteMixed(conn, now.Add(2*time.Minute), interval,
                casestrace.WriteSpec{
diff --git a/test/integration/standalone/inspect/common.go 
b/test/integration/standalone/inspect/common.go
index 9b2d1d847..f4e138e36 100644
--- a/test/integration/standalone/inspect/common.go
+++ b/test/integration/standalone/inspect/common.go
@@ -210,13 +210,13 @@ func writeTraceData(ctx context.Context, groupName, 
traceName string, dataCount
        }, flags.EventuallyTimeout).Should(gomega.Equal(io.EOF))
 }
 
-var _ = ginkgo.Describe("Inspect measure in standalone mode", func() {
+var _ = ginkgo.Describe("Inspect measure in standalone mode", ginkgo.Ordered, 
func() {
        var groupName string
        var measureName string
        var ctx context.Context
        const dataCount = 10
 
-       ginkgo.BeforeEach(func() {
+       ginkgo.BeforeAll(func() {
                ctx = context.TODO()
                groupName = fmt.Sprintf("inspect-measure-test-%d", 
time.Now().UnixNano())
                measureName = "test_measure"
@@ -269,14 +269,14 @@ var _ = ginkgo.Describe("Inspect measure in standalone 
mode", func() {
                        },
                })
                gomega.Expect(measureErr).ShouldNot(gomega.HaveOccurred())
-               time.Sleep(2 * time.Second)
+               time.Sleep(time.Second)
 
                ginkgo.By("Writing measure data")
                writeMeasureData(ctx, groupName, measureName, dataCount)
                time.Sleep(2 * time.Second)
        })
 
-       ginkgo.AfterEach(func() {
+       ginkgo.AfterAll(func() {
                _, _ = groupClient.Delete(ctx, 
&databasev1.GroupRegistryServiceDeleteRequest{Group: groupName})
        })
 
@@ -339,13 +339,13 @@ var _ = ginkgo.Describe("Inspect measure in standalone 
mode", func() {
        })
 })
 
-var _ = ginkgo.Describe("Inspect stream in standalone mode", func() {
+var _ = ginkgo.Describe("Inspect stream in standalone mode", ginkgo.Ordered, 
func() {
        var groupName string
        var streamName string
        var ctx context.Context
        const dataCount = 10
 
-       ginkgo.BeforeEach(func() {
+       ginkgo.BeforeAll(func() {
                ctx = context.TODO()
                groupName = fmt.Sprintf("inspect-stream-test-%d", 
time.Now().UnixNano())
                streamName = "test_stream"
@@ -392,14 +392,14 @@ var _ = ginkgo.Describe("Inspect stream in standalone 
mode", func() {
                        },
                })
                gomega.Expect(streamErr).ShouldNot(gomega.HaveOccurred())
-               time.Sleep(2 * time.Second)
+               time.Sleep(time.Second)
 
                ginkgo.By("Writing stream data")
                writeStreamData(ctx, groupName, streamName, dataCount)
                time.Sleep(2 * time.Second)
        })
 
-       ginkgo.AfterEach(func() {
+       ginkgo.AfterAll(func() {
                _, _ = groupClient.Delete(ctx, 
&databasev1.GroupRegistryServiceDeleteRequest{Group: groupName})
        })
 
@@ -448,13 +448,13 @@ var _ = ginkgo.Describe("Inspect stream in standalone 
mode", func() {
        })
 })
 
-var _ = ginkgo.Describe("Inspect trace in standalone mode", func() {
+var _ = ginkgo.Describe("Inspect trace in standalone mode", ginkgo.Ordered, 
func() {
        var groupName string
        var traceName string
        var ctx context.Context
        const dataCount = 10
 
-       ginkgo.BeforeEach(func() {
+       ginkgo.BeforeAll(func() {
                ctx = context.TODO()
                groupName = fmt.Sprintf("inspect-trace-test-%d", 
time.Now().UnixNano())
                traceName = "test_trace"
@@ -501,14 +501,14 @@ var _ = ginkgo.Describe("Inspect trace in standalone 
mode", func() {
                        },
                })
                gomega.Expect(traceErr).ShouldNot(gomega.HaveOccurred())
-               time.Sleep(2 * time.Second)
+               time.Sleep(time.Second)
 
                ginkgo.By("Writing trace data")
                writeTraceData(ctx, groupName, traceName, dataCount)
                time.Sleep(2 * time.Second)
        })
 
-       ginkgo.AfterEach(func() {
+       ginkgo.AfterAll(func() {
                _, _ = groupClient.Delete(ctx, 
&databasev1.GroupRegistryServiceDeleteRequest{Group: groupName})
        })
 
diff --git a/test/integration/standalone/other/forced_ttl_cleanup_test.go 
b/test/integration/standalone/other/forced_ttl_cleanup_test.go
index add48f6cd..097cd6d67 100644
--- a/test/integration/standalone/other/forced_ttl_cleanup_test.go
+++ b/test/integration/standalone/other/forced_ttl_cleanup_test.go
@@ -109,7 +109,7 @@ var _ = g.Describe("Forced TTL Cleanup", func() {
 
                // Wait for segments to be persisted and properly organized
                g.By("Waiting for segments to be persisted to disk")
-               time.Sleep(5 * time.Second)
+               time.Sleep(3 * time.Second)
 
                // Verify data was written successfully
                ctx := context.Background()
@@ -180,7 +180,7 @@ var _ = g.Describe("Forced TTL Cleanup", func() {
 
                // Wait additional time for segment deletions to complete
                g.By("Waiting for segment deletions to complete")
-               time.Sleep(10 * time.Second)
+               time.Sleep(5 * time.Second)
 
                // Verify old snapshot was cleaned up
                g.By("Verifying snapshot cleanup behavior")
diff --git a/test/integration/standalone/query_ondisk/etcd/suite_test.go 
b/test/integration/standalone/query_ondisk/etcd/suite_test.go
index 664692f01..e318c9b12 100644
--- a/test/integration/standalone/query_ondisk/etcd/suite_test.go
+++ b/test/integration/standalone/query_ondisk/etcd/suite_test.go
@@ -43,7 +43,7 @@ func init() {
                ns := timestamp.NowMilli().UnixNano()
                now := time.Unix(0, ns-ns%int64(time.Minute))
                test_cases.Initialize(addr, now)
-               time.Sleep(10 * time.Second)
+               time.Sleep(5 * time.Second)
                closeFunc()
                time.Sleep(time.Second)
                addr, _, closeFunc = setup.EmptyClosableStandalone(nil, path, 
ports)
diff --git a/test/integration/standalone/query_ondisk/property/suite_test.go 
b/test/integration/standalone/query_ondisk/property/suite_test.go
index cbe0289a9..27a4f8cb7 100644
--- a/test/integration/standalone/query_ondisk/property/suite_test.go
+++ b/test/integration/standalone/query_ondisk/property/suite_test.go
@@ -47,7 +47,7 @@ func init() {
                ns := timestamp.NowMilli().UnixNano()
                now := time.Unix(0, ns-ns%int64(time.Minute))
                test_cases.Initialize(addr, now)
-               time.Sleep(10 * time.Second)
+               time.Sleep(5 * time.Second)
                closeFunc()
                time.Sleep(time.Second)
                addr, _, closeFunc = setup.EmptyClosableStandalone(config, 
path, ports)

Reply via email to