You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "lincoln-lil (via GitHub)" <gi...@apache.org> on 2023/03/17 04:34:08 UTC

[GitHub] [flink] lincoln-lil opened a new pull request, #22199: [FLINK-31489][sql-gateway] Fix instable OperationManagerTest.testCloseOperation

lincoln-lil opened a new pull request, #22199:
URL: https://github.com/apache/flink/pull/22199

   ## What is the purpose of the change
   This is hotfix for the instable test `OperationManagerTest.testCloseOperation`, the reason is the concurrent closeOperation may finished before  awaitOperationTermination(operationHandle) which may encounter an expected error when do getOperation inside it.
   
   ## Brief change log
   move the awaitOperationTermination into the assert thrown block
   
   ## Verifying this change
   existing testCloseOperation case
   
   ## Does this pull request potentially affect one of the following parts:
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
     - The serializers: (no )
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
     - Does this pull request introduce a new feature? (no)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] leonardBang merged pull request #22199: [FLINK-31489][sql-gateway] Fix instable OperationManagerTest.testCloseOperation

Posted by "leonardBang (via GitHub)" <gi...@apache.org>.
leonardBang merged PR #22199:
URL: https://github.com/apache/flink/pull/22199


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] leonardBang commented on a diff in pull request #22199: [FLINK-31489][sql-gateway] Fix instable OperationManagerTest.testCloseOperation

Posted by "leonardBang (via GitHub)" <gi...@apache.org>.
leonardBang commented on code in PR #22199:
URL: https://github.com/apache/flink/pull/22199#discussion_r1139805704


##########
flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/service/operation/OperationManagerTest.java:
##########
@@ -186,7 +186,7 @@ void testCloseUninterruptedOperation() throws Exception {
     }
 
     @Test
-    void testCloseOperation() throws Exception {

Review Comment:
   👍🏻



##########
flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/service/operation/OperationManagerTest.java:
##########
@@ -196,9 +196,12 @@ void testCloseOperation() throws Exception {
                         });
 
         threadFactory.newThread(() -> operationManager.closeOperation(operationHandle)).start();
-        operationManager.awaitOperationTermination(operationHandle);
 
-        assertThatThrownBy(() -> operationManager.getOperation(operationHandle))
+        assertThatThrownBy(
+                        () -> {
+                            operationManager.awaitOperationTermination(operationHandle);
+                            operationManager.getOperation(operationHandle);

Review Comment:
   Both calls may throw the Exception as `awaitOperationTermination` will call `getOperation` firstly, +1



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] leonardBang commented on pull request #22199: [FLINK-31489][sql-gateway] Fix instable OperationManagerTest.testCloseOperation

Posted by "leonardBang (via GitHub)" <gi...@apache.org>.
leonardBang commented on PR #22199:
URL: https://github.com/apache/flink/pull/22199#issuecomment-1473208702

   @lincoln-lil Could you backport the fix to release-1.17 ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] lincoln-lil commented on pull request #22199: [FLINK-31489][sql-gateway] Fix instable OperationManagerTest.testCloseOperation

Posted by "lincoln-lil (via GitHub)" <gi...@apache.org>.
lincoln-lil commented on PR #22199:
URL: https://github.com/apache/flink/pull/22199#issuecomment-1473210152

   > 
   
   sure, I'll create one.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #22199: [FLINK-31489][sql-gateway] Fix instable OperationManagerTest.testCloseOperation

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #22199:
URL: https://github.com/apache/flink/pull/22199#issuecomment-1473119783

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "698b344967b261ebf458a6a678680a78a9a206fe",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "698b344967b261ebf458a6a678680a78a9a206fe",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 698b344967b261ebf458a6a678680a78a9a206fe UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] lincoln-lil commented on pull request #22199: [FLINK-31489][sql-gateway] Fix instable OperationManagerTest.testCloseOperation

Posted by "lincoln-lil (via GitHub)" <gi...@apache.org>.
lincoln-lil commented on PR #22199:
URL: https://github.com/apache/flink/pull/22199#issuecomment-1473218661

   @leonardBang the backport pr https://github.com/apache/flink/pull/22200


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org