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

Shengkai Fang commented on FLINK-21740:
---------------------------------------

Hi, all.

Before explain the reason why test fails, I will just describe the logic in the 
test. There are 3 parts in the test: {{TestingExecutor}}, {{Terminal}} and 
{{CliTableauResultView}}. The {{CliTableauResultView}} will requst the data 
from the {{TestingExecutor}} and send the data to {{Terminal}} to print. When 
{{CliTableauResultView}} request data from {{TestingExecutor}}, the 
{{TestingExecutor}} will memorize how many times {{CliTableauResultView}} 
reads. For simplicty, we call this variable as 
{{numRetrieveResultChancesCalls.}}

In the test, if {{numRetrieveResultChancesCalls}} is larger than 0, we will 
cancel the {{CliTableauResultView}}. It's possible {{CliTableauResultView}} 
read the data from the {{TestingExecutor}} but the terminal haven't printed.

Therefore, we just need to modify the logic to wait the terminal finish its job 
and then cancel the job.

I am willing to fix this problem. Please assign it to me.

>  CliTableauResultViewTest.testCancelBatchResult fails
> -----------------------------------------------------
>
>                 Key: FLINK-21740
>                 URL: https://issues.apache.org/jira/browse/FLINK-21740
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Client
>    Affects Versions: 1.13.0
>            Reporter: Guowei Ma
>            Priority: Major
>              Labels: test-stability
>
> https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=14500&view=logs&j=51fed01c-4eb0-5511-d479-ed5e8b9a7820&t=e5682198-9e22-5770-69f6-7551182edea8
> {code:java}
> [ERROR]   CliTableauResultViewTest.testCancelBatchResult:236 
> expected:<...-03-01 18:39:14.1 |
> [|    true |  2147483647 |               (NULL) |              abcdefg |     
> 1234567890 |     2020-03-01 18:39:14.12 |
> |   false | -2147483648 |  9223372036854775807 |               (NULL) |    
> 12345.06789 |    2020-03-01 18:39:14.123 |
> Query terminated, received a total of 4 rows]
> > but was:<...-03-01 18:39:14.1 |
> [Query terminated, received a total of 1 rows
> |    true |  2147483647 |               (NULL) |              abcdefg |     
> 1234567890 |     2020-03-01 18:39:14.12 |
> |   false | -2147483648 |  9223372036854775807 |               (NULL) |    
> 12345.06789 |    2020-03-01 18:39:14.123 |]
> >
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to