slinkydeveloper commented on a change in pull request #19039:
URL: https://github.com/apache/flink/pull/19039#discussion_r825982384



##########
File path: 
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/operators/sort/SortUtilTest.java
##########
@@ -52,8 +53,8 @@ public void testNormalizedKey() {
                 byte[] rndBytes = new byte[20];
                 random.nextBytes(rndBytes);
                 segments[2].put(0, rndBytes);
-                Assert.assertTrue(segments[0].compare(segments[2], 0, 0, 20) 
<= 0);
-                Assert.assertTrue(segments[1].compare(segments[2], 0, 0, 20) 
>= 0);
+                assertThat(segments[0].compare(segments[2], 0, 0, 20) <= 
0).isTrue();
+                assertThat(segments[1].compare(segments[2], 0, 0, 20) >= 
0).isTrue();

Review comment:
       The tool now translates it to 
   
   ```
     assertThat(segments[0].compare(segments[2], 0, 0, 
20)).isLessThanOrEqualTo(0);
   ```
   
   I prefer it over isPositive/isNegative, as the fact that 0 is included or 
not is more explicit this way




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to