Github user BorisOsipov commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3019#discussion_r92807445
  
    --- Diff: 
flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitorITCase.java
 ---
    @@ -262,8 +247,8 @@ public void testRedirectToLeader() throws Exception {
                                response = 
followingClient.getNextResponse(deadline.timeLeft());
                                assertEquals(HttpResponseStatus.OK, 
response.getStatus());
                                assertEquals(response.getType(), 
MimeTypes.getMimeTypeForExtension("json"));
    -                           
assertTrue(response.getContent().contains("\"taskmanagers\":1") ||
    -                                           
response.getContent().contains("\"taskmanagers\":0"));
    +                           assertThat(response.getContent(), 
either(containsString("\"taskmanagers\":1"))
    --- End diff --
    
    I've replaced assertTrue/False because assertThat and hamcrest matchers 
provide much better error messages. Instead of weird 'java.lang.AssertionError' 
we can get a more readable message in the log without effort.
    Of cource that's a matter of opinion and I can revert it. Should I do?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to