snuyanzin commented on code in PR #29436:
URL: https://github.com/apache/flink/pull/29436#discussion_r4242585022


##########
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java:
##########
@@ -292,25 +285,25 @@ public void testLibraryCacheRegistrationFailed() throws 
Exception {
                         .build(Executors.directExecutor());
 
         // task should be new and perfect
-        assertEquals(ExecutionState.CREATED, task.getExecutionState());
-        assertFalse(task.isCanceledOrFailed());
-        assertNull(task.getFailureCause());
+        assertThat(task.getExecutionState()).isEqualTo(ExecutionState.CREATED);
+        assertThat(task.isCanceledOrFailed()).isFalse();
+        assertThat(task.getFailureCause()).isNull();
 
         // should fail
         task.run();
 
         // verify final state
-        assertEquals(ExecutionState.FAILED, task.getExecutionState());
-        assertTrue(task.isCanceledOrFailed());
-        assertThat(task.getFailureCause(), is(testException));
+        assertThat(task.getExecutionState()).isEqualTo(ExecutionState.FAILED);

Review Comment:
   ```suggestion
           assertThat(task.getExecutionState()).isSameAs(ExecutionState.FAILED);
   ```



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