snuyanzin commented on code in PR #29436:
URL: https://github.com/apache/flink/pull/29436#discussion_r4242581151
##########
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java:
##########
@@ -228,55 +221,55 @@ public void testRegularExecution() 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);
Review Comment:
```suggestion
assertThat(task.getExecutionState()).isSameAs(ExecutionState.CREATED);
```
##########
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java:
##########
@@ -228,55 +221,55 @@ public void testRegularExecution() 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();
// go into the run method. we should switch to DEPLOYING, RUNNING, then
// FINISHED, and all should be good
task.run();
// verify final state
- assertEquals(ExecutionState.FINISHED, task.getExecutionState());
- assertFalse(task.isCanceledOrFailed());
- assertNull(task.getFailureCause());
- assertNull(task.getInvokable());
+
assertThat(task.getExecutionState()).isEqualTo(ExecutionState.FINISHED);
Review Comment:
```suggestion
assertThat(task.getExecutionState()).isSameAs(ExecutionState.FINISHED);
```
--
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]