You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2025/12/12 15:59:04 UTC

(hbase) branch master updated: HBASE-29759 TestAsyncTableScan fails with tracing assert error (#7538)

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

zhangduo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new f3a30012d9d HBASE-29759 TestAsyncTableScan fails with tracing assert error (#7538)
f3a30012d9d is described below

commit f3a30012d9d9d6bf28f6f756dacc3b2ad1b74b38
Author: Nick Dimiduk <nd...@apache.org>
AuthorDate: Fri Dec 12 16:58:57 2025 +0100

    HBASE-29759 TestAsyncTableScan fails with tracing assert error (#7538)
    
    Retrieve the most recent span when validating results.
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
---
 .../java/org/apache/hadoop/hbase/client/TestAsyncTableScan.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableScan.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableScan.java
index efd76677373..8479bd05221 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableScan.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableScan.java
@@ -120,7 +120,8 @@ public class TestAsyncTableScan extends AbstractTestAsyncTableScan {
         hasParentSpanId(parentSpanId), hasStatusWithCode(StatusCode.OK), hasEnded());
     waitForSpan(scanOperationSpanMatcher);
     final String scanOperationSpanId = spanStream().filter(scanOperationSpanMatcher::matches)
-      .map(SpanData::getSpanId).findAny().get();
+      .max((a, b) -> Long.compare(a.getEndEpochNanos(), b.getEndEpochNanos()))
+      .map(SpanData::getSpanId).get();
 
     final Matcher<SpanData> onNextMatcher = hasName("TracedScanResultConsumer#onNext");
     waitForSpan(onNextMatcher);
@@ -157,7 +158,8 @@ public class TestAsyncTableScan extends AbstractTestAsyncTableScan {
         hasException(exceptionMatcher), hasEnded());
     waitForSpan(scanOperationSpanMatcher);
     final String scanOperationSpanId = spanStream().filter(scanOperationSpanMatcher::matches)
-      .map(SpanData::getSpanId).findAny().get();
+      .max((a, b) -> Long.compare(a.getEndEpochNanos(), b.getEndEpochNanos()))
+      .map(SpanData::getSpanId).get();
 
     final Matcher<SpanData> onErrorMatcher = hasName("TracedScanResultConsumer#onError");
     waitForSpan(onErrorMatcher);