zhongyujiang commented on code in PR #7133:
URL: https://github.com/apache/iceberg/pull/7133#discussion_r1142081048


##########
api/src/test/java/org/apache/iceberg/util/TestCharSequenceSet.java:
##########
@@ -35,4 +37,33 @@ public void testSearchingInCharSequenceCollection() {
     // this would fail with a normal Set<CharSequence>
     Assertions.assertThat(set.contains("def")).isTrue();
   }
+
+  @Test
+  public void testRetainAll() {
+    CharSequenceSet set = CharSequenceSet.of(ImmutableList.of("123", "456"));
+
+    Assert.assertTrue("Set should be changed", 
set.retainAll(ImmutableList.of("456", "789", 123)));
+    Assert.assertTrue("Should not retain element \"123\"", set.size() == 1);
+    Assert.assertTrue("Should retain element \"456\"", set.contains("456"));

Review Comment:
   Done, also changed L45 and other boolean assertions, this uses 
`overridingErrorMessage` to provide error message and thefore increases the 
number of lines, but allows us not to mix `Assert` and `Assertions`. Do you 
think it's OK?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to