You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "clolov (via GitHub)" <gi...@apache.org> on 2023/06/09 09:06:59 UTC
[GitHub] [kafka] clolov commented on a diff in pull request #13712: KAFKA-14133: Migrate Admin mock in TaskManagerTest to Mockito
clolov commented on code in PR #13712:
URL: https://github.com/apache/kafka/pull/13712#discussion_r1224047045
##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java:
##########
@@ -3694,12 +3694,12 @@ public Map<TopicPartition, OffsetAndMetadata> prepareCommit() {
@Test
public void shouldSendPurgeData() {
- resetToStrict(adminClient);
- expect(adminClient.deleteRecords(singletonMap(t1p1, RecordsToDelete.beforeOffset(5L))))
- .andReturn(new DeleteRecordsResult(singletonMap(t1p1, completedFuture())));
- expect(adminClient.deleteRecords(singletonMap(t1p1, RecordsToDelete.beforeOffset(17L))))
- .andReturn(new DeleteRecordsResult(singletonMap(t1p1, completedFuture())));
- replay(adminClient);
+ when(adminClient.deleteRecords(singletonMap(t1p1, RecordsToDelete.beforeOffset(5L))))
+ .thenReturn(new DeleteRecordsResult(singletonMap(t1p1, completedFuture())));
+ when(adminClient.deleteRecords(singletonMap(t1p1, RecordsToDelete.beforeOffset(17L))))
+ .thenReturn(new DeleteRecordsResult(singletonMap(t1p1, completedFuture())));
+
+ InOrder inOrder = Mockito.inOrder(adminClient);
Review Comment:
Yes, sorry, thank you very much for spotting this!
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org