RocMarshal commented on code in PR #23994:
URL: https://github.com/apache/flink/pull/23994#discussion_r1436698086


##########
flink-core/src/test/java/org/apache/flink/configuration/DelegatingConfigurationTest.java:
##########
@@ -136,15 +136,65 @@ public void 
testDelegationConfigurationToMapConsistentWithAddAllToProperties() {
             mapProperties.put(entry.getKey(), entry.getValue());
         }
         // Verification
-        assertEquals(properties, mapProperties);
+        assertThat(mapProperties).isEqualTo(properties);
     }
 
     @Test
-    public void testSetReturnsDelegatingConfiguration() {
+    void testSetReturnsDelegatingConfiguration() {
         final Configuration conf = new Configuration();
         final DelegatingConfiguration delegatingConf = new 
DelegatingConfiguration(conf, "prefix.");
 
         
Assertions.assertThat(delegatingConf.set(CoreOptions.DEFAULT_PARALLELISM, 1))
                 .isSameAs(delegatingConf);
     }
+
+    @Test
+    void testGetWithOverrideDefault() {

Review Comment:
   I like the test case! 👍 



##########
flink-core/src/test/java/org/apache/flink/configuration/DelegatingConfigurationTest.java:
##########
@@ -115,11 +115,11 @@ public void testDelegationConfigurationWithPrefix() {
         configuration = new DelegatingConfiguration(backingConf, prefix);
         keySet = configuration.keySet();
 
-        assertTrue(keySet.isEmpty());
+        assertThat(keySet).isEmpty();

Review Comment:
   how about   
   ```
           assertThat(configuration.keySet()).isEmpty();
   
   ```



##########
flink-core/src/test/java/org/apache/flink/configuration/DelegatingConfigurationTest.java:
##########
@@ -103,8 +103,8 @@ public void testDelegationConfigurationWithPrefix() {
         DelegatingConfiguration configuration = new 
DelegatingConfiguration(backingConf, prefix);
         Set<String> keySet = configuration.keySet();
 
-        assertEquals(keySet.size(), 1);
-        assertEquals(keySet.iterator().next(), expectedKey);
+        assertThat(keySet).hasSize(1);
+        assertThat(expectedKey).isEqualTo(keySet.iterator().next());

Review Comment:
   how about :
   
   ```
           assertThat(configuration.keySet()).containsExactly(expectedKey);
   ```



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to