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

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


The following commit(s) were added to refs/heads/pr-1128 by this push:
     new 6628ed292 fix(test): separate flush and merge waits in schema-change 
merge test
6628ed292 is described below

commit 6628ed292a8ae83674206c3bbafd4f8eb11023f4
Author: Hongtao Gao <[email protected]>
AuthorDate: Tue May 19 07:06:33 2026 +0000

    fix(test): separate flush and merge waits in schema-change merge test
    
    The "changed tag type after merge" test used a single 30s Eventually
    to cover both flushing the second batch to disk and completing the
    merge. On resource-constrained CI runners with -race, flush latency
    consumed most of the window, causing the merge Eventually to time out.
    
    Add a dedicated Eventually that waits for the second batch to flush
    (filePartCount > filePartCountAfterFirstBatch) before waiting for the
    merge, giving each phase its own 30s timeout.
    
    via [HAPI](https://hapi.run)
    
    Co-Authored-By: HAPI <[email protected]>
    Co-Authored-By: Claude Opus 4.7 <[email protected]>
---
 banyand/trace/metadata_test.go | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/banyand/trace/metadata_test.go b/banyand/trace/metadata_test.go
index dae19e9ba..98c58b34d 100644
--- a/banyand/trace/metadata_test.go
+++ b/banyand/trace/metadata_test.go
@@ -372,9 +372,17 @@ var _ = Describe("Metadata", func() {
                                Eventually(func() int64 {
                                        return getFilePartCount(svcs, groupName)
                                }, 
flags.EventuallyTimeout).Should(BeNumerically(">=", 1))
+                               filePartCountAfterFirstBatch := 
getFilePartCount(svcs, groupName)
                                changeTraceExtraTagType(svcs, traceName, 
groupName)
                                writeSchemaChangeTraceData(svcs, traceName, 
groupName, now.Add(-1*time.Hour), 3,
                                        writeTraceDataOptions{extraTag: 
extraTagString, traceIDPrefix: "trace_new_"})
+                               // Wait for the second batch to flush to disk, 
creating additional
+                               // file parts that the merge loop can pick up. 
Without this gate the
+                               // merge Eventually below also has to absorb 
flush latency, which can
+                               // exceed 30 s on resource-constrained CI 
runners with -race.
+                               Eventually(func() int64 {
+                                       return getFilePartCount(svcs, groupName)
+                               }, 
flags.EventuallyTimeout).Should(BeNumerically(">", 
filePartCountAfterFirstBatch))
                                partCountBeforeMerge := getTotalPartCount(svcs, 
groupName)
                                Eventually(func() int64 {
                                        return getTotalPartCount(svcs, 
groupName)

Reply via email to