azagrebin commented on a change in pull request #11427: [FLINK-15790][k8s] Make 
FlinkKubeClient and its implementations asynchronous
URL: https://github.com/apache/flink/pull/11427#discussion_r401746918
 
 

 ##########
 File path: 
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClientTest.java
 ##########
 @@ -176,30 +178,31 @@ public void testStopPod() {
        }
 
        @Test
-       public void testServiceLoadBalancerWithNoIP() {
+       public void testServiceLoadBalancerWithNoIP() throws Exception {
                final String hostName = "test-host-name";
                mockRestServiceWithLB(hostName, "");
 
-               final Endpoint resultEndpoint = 
flinkKubeClient.getRestEndpoint(CLUSTER_ID);
+               final Optional<Endpoint> resultEndpoint = 
flinkKubeClient.getRestEndpoint(CLUSTER_ID).get();
 
-               assertEquals(hostName, resultEndpoint.getAddress());
-               assertEquals(REST_PORT, resultEndpoint.getPort());
+               assertTrue(resultEndpoint.isPresent());
 
 Review comment:
   ```suggestion
                assertThat(resultEndpoint.isPresent(), is(true));
   ```
   we usually use `assertThat .. is` pattern for readability

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


With regards,
Apache Git Services

Reply via email to