#98420 verifies that the election scheduler is not running when a cluster is stable, but this assertion does not hold in the `AtomicRegisterCoordinatorTests` suite. This issue tracks the work to investigate and fix up the problem.
server/src/test/java/org/elasticsearch/cluster/coordination/AtomicRegisterCoordinatorTests.java
private final Map<Long, PersistentClusterState> clusterStateByTerm = new HashMap<>();
        private void writeClusterState(ClusterState clusterState) {
            clusterStateByTerm.put(
                clusterState.term(),
                new PersistentClusterState(clusterState.term(), clusterState.version(), clusterState.metadata())
            );
        }
        void getClusterStateForTerm(long termGoal, ActionListener<PersistentClusterState> listener) {
            ActionListener.completeWith(listener, () -> {
                for (long term = termGoal; term > 0; term--) {
                    var persistedState = clusterStateByTerm.get(term);
                    if (persistedState != null) {
                        return persistedState;
                    }
                }
                return null;
            });
        }
    }
    private static class SharedHeartbeatStore implements HeartbeatStore {