fredia commented on code in PR #22457:
URL: https://github.com/apache/flink/pull/22457#discussion_r1187186157
##########
flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/itcases/AbstractQueryableStateTestBase.java:
##########
@@ -492,9 +493,7 @@ public Integer getKey(Tuple2<Integer, Long> value) {
jobStatusFuture =
clusterClient.getJobStatus(closableJobGraph.getJobId());
}
- assertEquals(
- JobStatus.RUNNING,
- jobStatusFuture.get(deadline.timeLeft().toMillis(),
TimeUnit.MILLISECONDS));
+ assertThat(jobStatusFuture.get(deadline.timeLeft().toMillis(),
TimeUnit.MILLISECONDS)).isEqualTo(JobStatus.RUNNING);
Review Comment:
This test is mainly to verify the status of the job rather than the
deadline, so I tend to use Asserj's assertion for the future
##########
flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/itcases/AbstractQueryableStateTestBase.java:
##########
@@ -246,19 +247,20 @@ public Integer getKey(Tuple2<Integer, Long> value) {
.get(deadline.timeLeft().toMillis(),
TimeUnit.MILLISECONDS);
}
- assertTrue("Not all keys are non-zero", allNonZero);
+ assertThat(allNonZero).isTrue().withFailMessage("Not all keys are
non-zero");
// All should be non-zero
for (int i = 0; i < numKeys; i++) {
long count = counts.get(i);
- assertTrue("Count at position " + i + " is " + count, count >
0);
+ assertThat(count).isGreaterThan(0).withFailMessage("Count at
position " + i + " is " + count);
}
}
}
/** Tests that duplicate query registrations fail the job at the
JobManager. */
- @Test(timeout = 60_000)
- public void testDuplicateRegistrationFailsJob() throws Exception {
+ @Test
+ @Timeout(60_000)
Review Comment:
Removed @timeout.
--
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]