XComp commented on code in PR #23203:
URL: https://github.com/apache/flink/pull/23203#discussion_r1294696497
##########
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptive/WaitingForResourcesTest.java:
##########
@@ -328,19 +260,17 @@ public void
testInternalRunScheduledTasks_correctExecutionOrder() {
ctx.runScheduledTasks();
- assertThat(thirdRun.get(), is(true));
+ assertThat(thirdRun).isTrue();
}
@Test
- public void testInternalRunScheduledTasks_tasksAreRemovedAfterExecution() {
+ void testInternalRunScheduledTasks_tasksAreRemovedAfterExecution() {
MockContext ctx = new MockContext();
AtomicBoolean executed = new AtomicBoolean(false);
Runnable executeOnce =
() -> {
- if (executed.get()) {
- fail("Multiple executions");
- }
+ assertThat(executed).as("Multiple executions").isFalse();
Review Comment:
> Do you mean we shouldn't call assertThat(executed).as("Multiple
executions").isFalse(); here? The fail is similar to the old check, so I
updated it to assertThat
No, the `assertThat` is fining. I just needed an anchor point to suggest
adding the `assertThat(executed).isTrue()` to the end of the test.
--
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]