[hotfix][test] The LeaderElectionService reset is not necessary anymore after the changes of cc5d321d (FLINK-25432)
In FLINK-25432 we changed the behavior from restarting a Dispatcher (which utilizes leader election)
to the cleanup runner (which doesn't use leader election). Therefore, resetting the leader election
became obsolete in this test.
Signed-off-by: Matthias Pohl <matthias.pohl@aiven.io>
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherCleanupITCase.java b/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherCleanupITCase.java
index 2aaed87..50db0ee 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherCleanupITCase.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherCleanupITCase.java
@@ -302,12 +302,6 @@
waitForJobToFinish(leaderElectionService, dispatcherGateway, jobId);
firstCleanupTriggered.await();
- // Remove job master leadership.
- leaderElectionService.notLeader();
-
- // This will clear internal state of election service, so a new contender can register.
- leaderElectionService.stop();
-
assertThat(
"The cleanup should have been triggered only once.",
actualGlobalCleanupCallCount.get(),