reswqa commented on code in PR #24602:
URL: https://github.com/apache/flink/pull/24602#discussion_r1547097051


##########
flink-core/src/test/java/org/apache/flink/api/dag/TransformationTest.java:
##########
@@ -89,11 +91,12 @@ void testDeclareManagedMemoryUseCase() {
         transformation.declareManagedMemoryUseCaseAtOperatorScope(
                 ManagedMemoryUseCase.OPERATOR, 123);
         
transformation.declareManagedMemoryUseCaseAtSlotScope(ManagedMemoryUseCase.STATE_BACKEND);
-        assertThat(
-                        transformation
-                                .getManagedMemoryOperatorScopeUseCaseWeights()
-                                .get(ManagedMemoryUseCase.OPERATOR))
-                .isEqualTo(123);
+        assertEquals(
+                123,
+                transformation
+                        .getManagedMemoryOperatorScopeUseCaseWeights()
+                        .get(ManagedMemoryUseCase.OPERATOR)
+                        .intValue());

Review Comment:
   😧 This is leading us in the wrong direction, we are trying to unify all our 
assertions into AssertJ indeed.



##########
flink-core/src/test/java/org/apache/flink/api/dag/TransformationTest.java:
##########
@@ -134,6 +137,20 @@ void 
testDeclareManagedMemorySlotScopeUseCaseFailWrongScope() {
                 .isInstanceOf(IllegalArgumentException.class);
     }
 
+    @Test
+    void testSetResourcesUseCaseFailNullMinResources() {
+        ResourceSpec resourceSpec = ResourceSpec.newBuilder(1.0, 100).build();
+        assertThatThrownBy(() -> transformation.setResources(null, 
resourceSpec))
+                .isInstanceOf(NullPointerException.class);
+    }
+
+    @Test
+    void testSetResourcesUseCaseFailNullPreferredResources() {
+        ResourceSpec resourceSpec = ResourceSpec.newBuilder(1.0, 100).build();
+        assertThatThrownBy(() -> transformation.setResources(resourceSpec, 
null))
+                .isInstanceOf(NullPointerException.class);
+    }
+

Review Comment:
   We can these this two tests into one.



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