zhuzhurk commented on code in PR #20153: URL: https://github.com/apache/flink/pull/20153#discussion_r917218919
########## flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/DeclarativeSlotPoolServiceTest.java: ########## @@ -230,14 +228,13 @@ public void testCreateAllocatedSlotReport() throws Exception { declarativeSlotPoolService.createAllocatedSlotReport( taskManagerLocation2.getResourceID()); - assertThat( - allocatedSlotReport.getAllocatedSlotInfos(), - contains(matchesWithSlotContext(simpleSlotContext2))); + assertThat(allocatedSlotReport.getAllocatedSlotInfos()) + .is(matching(contains(matchesWithSlotContext(simpleSlotContext2)))); Review Comment: This matcher is simpler so I prefer to drop it and rewrite the verification to be: ``` assertThat(allocatedSlotReport.getAllocatedSlotInfos()) .allMatch( context -> context.getAllocationId() .equals(simpleSlotContext2.getAllocationId()) && context.getSlotIndex() == simpleSlotContext2.getPhysicalSlotNumber()); ``` -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org