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

leonard pushed a commit to branch release-1.17
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.17 by this push:
     new f0a7dcc4a1c [FLINK-31489][sql-gateway] Fix instable test 
OperationManagerTest.testCloseOperation
f0a7dcc4a1c is described below

commit f0a7dcc4a1c4b3c4b2e4e7029e8f60fb7e7720d2
Author: lincoln lee <lincoln.8...@gmail.com>
AuthorDate: Fri Mar 17 19:35:12 2023 +0800

    [FLINK-31489][sql-gateway] Fix instable test 
OperationManagerTest.testCloseOperation
    
    This closes #22200.
---
 .../table/gateway/service/operation/OperationManagerTest.java    | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/service/operation/OperationManagerTest.java
 
b/flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/service/operation/OperationManagerTest.java
index 6ccdd0bd2b0..d734ad8afa3 100644
--- 
a/flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/service/operation/OperationManagerTest.java
+++ 
b/flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/service/operation/OperationManagerTest.java
@@ -186,7 +186,7 @@ class OperationManagerTest {
     }
 
     @Test
-    void testCloseOperation() throws Exception {
+    void testCloseOperation() {
         CountDownLatch endRunningLatch = new CountDownLatch(1);
         OperationHandle operationHandle =
                 operationManager.submitOperation(
@@ -196,9 +196,12 @@ class OperationManagerTest {
                         });
 
         threadFactory.newThread(() -> 
operationManager.closeOperation(operationHandle)).start();
-        operationManager.awaitOperationTermination(operationHandle);
 
-        assertThatThrownBy(() -> 
operationManager.getOperation(operationHandle))
+        assertThatThrownBy(
+                        () -> {
+                            
operationManager.awaitOperationTermination(operationHandle);
+                            operationManager.getOperation(operationHandle);
+                        })
                 .satisfies(
                         FlinkAssertions.anyCauseMatches(
                                 SqlGatewayException.class,

Reply via email to