[ 
https://issues.apache.org/jira/browse/FLINK-33000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17762993#comment-17762993
 ] 

Matthias Pohl commented on FLINK-33000:
---------------------------------------

Thanks for looking into it more closely. I'm not 100% whether I fully 
understand the requirements you're talking about: My understanding is that the 
test creates threads to trigger concurrent behavior (e.g. in line [line 
1073|https://github.com/apache/flink/blob/c9e87fe410c42f7e7c19c81456d4212a58564f5e/flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/service/SqlGatewayServiceITCase.java#L1073])
 without cleaning those threads up. The intention of this Jira was to do an 
explicit shutdown to clean up any threads that still linger around. Where do we 
have the requirement in the test code for a fixed number of threads?

{quote}
2. The AbstractTestBase class still seems to be inherited by many other Test 
classes, is there any risk to remove this class? The SQLGatewayServiceITCase 
class does not inherit any other class, I'm not quite sure which abstract class 
I should delete and the relation between the use of JUnit5 in this class and 
the removal of AbstractTestBase .
{quote}

I might have been a bit vague on removing the {{AbstractTestBase}}. I didn't 
mean to delete the class. You're totally correct that this class is used in 
other places. My concern was that {{AbstractTestBase}} provides JUnit4 
functionality but {{SqlGatewayServiceITCase}} is a JUnit5-based test. My 
suggestion would have been to remove {{AbstractTestBase}} from 
{{SqlGatewayServiceITCase}} as a parent and use JUnit5 functionality instead 
({{MiniClusterExtension}} for instance). Does that make sense?

and just as a FYI: I might not be responsive the next two weeks.

> SqlGatewayServiceITCase should utilize TestExecutorExtension instead of using 
> a ThreadFactory
> ---------------------------------------------------------------------------------------------
>
>                 Key: FLINK-33000
>                 URL: https://issues.apache.org/jira/browse/FLINK-33000
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Gateway, Tests
>    Affects Versions: 1.16.2, 1.18.0, 1.17.1, 1.19.0
>            Reporter: Matthias Pohl
>            Priority: Major
>              Labels: starter
>
> {{SqlGatewayServiceITCase}} uses a {{ExecutorThreadFactory}} for its 
> asynchronous operations. Instead, one should use {{TestExecutorExtension}} to 
> ensure proper cleanup of threads.
> We might also want to remove the {{AbstractTestBase}} parent class because 
> that uses JUnit4 whereas {{SqlGatewayServiceITCase}} is already based on 
> JUnit5



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to