XComp commented on code in PR #22661:
URL: https://github.com/apache/flink/pull/22661#discussion_r1242211530


##########
flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/DefaultLeaderElectionServiceTest.java:
##########
@@ -237,66 +253,11 @@ void 
testDelayedGrantCallAfterContenderBeingDeregisteredAgain() throws Exception
         };
     }
 
-    /**
-     * Test to cover the issue described in FLINK-31814. This test could be 
removed after
-     * FLINK-31814 is resolved.
-     */
-    @Test
-    void testOnRevokeCallWhileClosingService() throws Exception {
-        final TestingLeaderElectionDriver.TestingLeaderElectionDriverFactory 
driverFactory =
-                new 
TestingLeaderElectionDriver.TestingLeaderElectionDriverFactory(
-                        LeaderElectionEventHandler::onRevokeLeadership);
-
-        try (final DefaultLeaderElectionService testInstance =
-                new DefaultLeaderElectionService(driverFactory)) {
-            testInstance.startLeaderElectionBackend();
-
-            final TestingLeaderElectionDriver driver = 
driverFactory.getCurrentLeaderDriver();
-            assertThat(driver).isNotNull();
-
-            driver.isLeader();
-
-            final LeaderElection leaderElection =
-                    
testInstance.createLeaderElection(createRandomContenderID());
-            final TestingContender contender =
-                    new TestingContender("unused-address", leaderElection);
-            contender.startLeaderElection();
-
-            contender.waitForLeader();
-
-            leaderElection.close();
-
-            contender.throwErrorIfPresent();
-        }
-    }
-
-    @Test
-    void testStopWhileHavingLeadership() throws Exception {

Review Comment:
   I tried to put test removals into their own commits to be able to give the 
reasoning in the commit message. For this specific test it is:
   ```
   [test] Removes testStopWhileHavingLeadership: This test case is covered by 
   - testDelayedGrantCallAfterContenderRegistration which checks delayed grant 
event processing (the first part of the test granting leadership)
   - testOnRevokeLeadershipIsTriggeredAfterLeaderElectionBeingStop which checks 
that the leadership is revoked in the contender after the close is called (the 
second part of the test revoking the leadership in the contender)
   ```



-- 
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]

Reply via email to