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

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


The following commit(s) were added to refs/heads/master by this push:
     new a47e4bf9b9e [FLINK-34673][test] Fix 
SessionRelatedITCase#testTouchSession failure on GitHub Actions (#24826)
a47e4bf9b9e is described below

commit a47e4bf9b9ef287d5ff7f5783df993e4cef2dd1a
Author: juanvisoler <[email protected]>
AuthorDate: Tue Oct 6 19:19:34 2026 +0200

    [FLINK-34673][test] Fix SessionRelatedITCase#testTouchSession failure on 
GitHub Actions (#24826)
    
    * [FLINK-34673][test] Fix SessionRelatedITCase#testTouchSession failure on 
GitHub Actions
    
    * [FLINK-34673][test] Wait for clock to advance instead of sleeping in 
testTouchSession
    
    Wait until the clock advances past the session's last access time before
    sending the heartbeat, and assert a strictly greater access time.
    
    Generated-by: Claude Code (Claude Opus 5.5)
---
 .../org/apache/flink/table/gateway/rest/SessionRelatedITCase.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/rest/SessionRelatedITCase.java
 
b/flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/rest/SessionRelatedITCase.java
index 0e9d614403d..30aa2c272c5 100644
--- 
a/flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/rest/SessionRelatedITCase.java
+++ 
b/flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/rest/SessionRelatedITCase.java
@@ -22,6 +22,7 @@ import org.apache.flink.configuration.GlobalConfiguration;
 import org.apache.flink.runtime.rest.messages.EmptyMessageParameters;
 import org.apache.flink.runtime.rest.messages.EmptyRequestBody;
 import org.apache.flink.runtime.rest.messages.EmptyResponseBody;
+import org.apache.flink.runtime.testutils.CommonTestUtils;
 import org.apache.flink.table.gateway.api.session.SessionHandle;
 import org.apache.flink.table.gateway.api.utils.SqlGatewayException;
 import 
org.apache.flink.table.gateway.rest.handler.AbstractSqlGatewayRestHandler;
@@ -191,13 +192,14 @@ class SessionRelatedITCase extends RestAPIITCaseBase {
 
         long lastAccessTime = session.getLastAccessTime();
 
+        CommonTestUtils.waitUntilCondition(() -> System.currentTimeMillis() > 
lastAccessTime);
         CompletableFuture<EmptyResponseBody> future =
                 sendRequest(
                         TriggerSessionHeartbeatHeaders.getInstance(),
                         sessionMessageParameters,
                         emptyRequestBody);
         future.get();
-        
assertThat(session.getLastAccessTime()).isGreaterThanOrEqualTo(lastAccessTime);
+        assertThat(session.getLastAccessTime()).isGreaterThan(lastAccessTime);
     }
 
     @Test

Reply via email to