darionyaphet commented on a change in pull request #13335:
URL: https://github.com/apache/flink/pull/13335#discussion_r484422550



##########
File path: 
flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/cli/CliClientTest.java
##########
@@ -144,18 +138,13 @@ public void testUseNonExistingCatalog() throws Exception {
                        .build();
 
                InputStream inputStream = new ByteArrayInputStream("use catalog 
cat;\n".getBytes());
-               CliClient cliClient = null;
                SessionContext sessionContext = new 
SessionContext("test-session", new Environment());
                String sessionId = executor.openSession(sessionContext);
 
-               try (Terminal terminal = new DumbTerminal(inputStream, new 
MockOutputStream())) {
-                       cliClient = new CliClient(terminal, sessionId, 
executor, File.createTempFile("history", "tmp").toPath());
-                       cliClient.open();
+               try (Terminal terminal = new DumbTerminal(inputStream, new 
MockOutputStream());
+                        CliClient client = new CliClient(terminal, sessionId, 
executor, File.createTempFile("history", "tmp").toPath())) {

Review comment:
       > nit: fix indention here and below, seems like a typical copy paste 
mistake. how about we create a method to reduce duplicate code (e.g. for the 
tmp file)?
   
   Maybe Idea's indention is using space.I try to change it to the tab




----------------------------------------------------------------
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:
[email protected]


Reply via email to