tillrohrmann commented on a change in pull request #9609: 
[FLINK-13750][client][coordination] Separate HA services between client-side 
and server-side
URL: https://github.com/apache/flink/pull/9609#discussion_r320669884
 
 

 ##########
 File path: 
flink-clients/src/test/java/org/apache/flink/client/RemoteExecutorHostnameResolutionTest.java
 ##########
 @@ -51,35 +50,34 @@ public static void check() {
 
        @Test
        public void testUnresolvableHostname1() throws Exception {
-
                RemoteExecutor exec = new RemoteExecutor(nonExistingHostname, 
port);
+
                try {
                        exec.executePlan(getProgram());
                        fail("This should fail with an 
ProgramInvocationException");
-               }
-               catch (UnknownHostException ignored) {
-                       // that is what we want!
+               } catch (UnknownHostException ignored) {
+                       // expected
                }
        }
 
        @Test
        public void testUnresolvableHostname2() throws Exception {
-
-               InetSocketAddress add = new 
InetSocketAddress(nonExistingHostname, port);
-               RemoteExecutor exec = new RemoteExecutor(add, new 
Configuration(),
-                               Collections.<URL>emptyList(), 
Collections.<URL>emptyList());
+               RemoteExecutor exec = new RemoteExecutor(
+                       new InetSocketAddress(nonExistingHostname, port),
+                       new Configuration(),
+                       Collections.emptyList(),
+                       Collections.emptyList());
                try {
                        exec.executePlan(getProgram());
                        fail("This should fail with an 
ProgramInvocationException");
-               }
-               catch (UnknownHostException ignored) {
+               } catch (UnknownHostException ignored) {
                        // that is what we want!
                }
        }
 
        private static Plan getProgram() {
                ExecutionEnvironment env = 
ExecutionEnvironment.getExecutionEnvironment();
-               env.fromElements(1, 2, 3).output(new 
DiscardingOutputFormat<Integer>());
+               env.fromElements(1, 2, 3).output(new 
DiscardingOutputFormat<>());
 
 Review comment:
   The changes in this file seem to be unrelated. I'd suggest to keep them but 
in the future, let's try to avoid them.

----------------------------------------------------------------
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