yashmayya commented on code in PR #12509: URL: https://github.com/apache/kafka/pull/12509#discussion_r949456092
########## connect/runtime/src/test/java/org/apache/kafka/connect/runtime/distributed/WorkerCoordinatorTest.java: ########## @@ -432,30 +422,28 @@ public void testLeaderPerformAssignment1() { assertEquals(Collections.emptyList(), memberAssignment.connectors()); assertEquals(Collections.singletonList(taskId1x0), memberAssignment.tasks()); - PowerMock.verifyAll(); + verify(configStorage).snapshot(); } @Test public void testLeaderPerformAssignment2() { // Since all the protocol responses are mocked, the other tests validate doSync runs, but don't validate its // output. So we test it directly here. - EasyMock.expect(configStorage.snapshot()).andReturn(configState2); - - PowerMock.replayAll(); + when(configStorage.snapshot()).thenReturn(configState2); // Prime the current configuration state coordinator.metadata(); - // Mark everyone as in sync with configState1 + // Mark everyone as in sync with configState2 List<JoinGroupResponseData.JoinGroupResponseMember> responseMembers = new ArrayList<>(); responseMembers.add(new JoinGroupResponseData.JoinGroupResponseMember() .setMemberId("leader") - .setMetadata(ConnectProtocol.serializeMetadata(new ConnectProtocol.WorkerState(LEADER_URL, 1L)).array()) + .setMetadata(ConnectProtocol.serializeMetadata(new ConnectProtocol.WorkerState(LEADER_URL, 2L)).array()) Review Comment: Yep, makes sense. I thought about making these changes originally, but refrained from doing so with the thought that it might be a little noisy and detract from the focus of the PR. Thanks for the feedback, I've made the requisite changes! -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org