godfreyhe commented on a change in pull request #11397: [FLINK-16217] 
[sql-client] catch all exceptions to avoid SQL client crashed
URL: https://github.com/apache/flink/pull/11397#discussion_r392168376
 
 

 ##########
 File path: 
flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/cli/CliClientTest.java
 ##########
 @@ -151,6 +152,33 @@ public void write(int b) throws IOException {
                }
        }
 
+       @Test
+       public void testInvalidateValue() throws Exception {
+               Executor executor = mock(Executor.class);
+               doThrow(new ValidationException("Property 'parallelism' must be 
a integer value but was: 10a"))
+                       .when(executor).setSessionProperty(any(), any(), any());
+               InputStream inputStream = new ByteArrayInputStream("set 
execution.parallelism = 10a;\n".getBytes());
+               // don't care about the output
+               OutputStream outputStream = new OutputStream() {
 
 Review comment:
   we can use {{MockOutputStream}} here after its access modifiers is changed 
from `private` to `public`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to