```
java.lang.AssertionError: 	
Expected: a string starting with "[6] consecutive checks of the master node [{leader-1}{LUl9nt39RtSPdM2L9PNAqQ}{0.0.0.0}{0.0.0.0:9}{cdfhimrsw}] were unsuccessful ([1] rejected, [5] timed out), restarting discovery; more details may be available in the master node logs [last unsuccessful check: "	
     but: was "[6] consecutive checks of the master node [{leader-1}{LUl9nt39RtSPdM2L9PNAqQ}{0.0.0.0}{0.0.0.0:9}{cdfhimrsw}] were unsuccessful ([2] rejected, [4] timed out), restarting discovery; more details may be available in the master node logs [last unsuccessful check: simulated error]"	
at __randomizedtesting.SeedInfo.seed([8C3B1DDF41962CA3:C00696D508BE1D48]:0)	
at org.elasticsearch.cluster.coordination.LeaderCheckerTests.lambda$testFollowerBehaviour$1(LeaderCheckerTests.java:170)	
at org.elasticsearch.cluster.coordination.LeaderChecker$CheckScheduler$2.run(LeaderChecker.java:375)	
•••
at org.elasticsearch.cluster.coordination.LeaderCheckerTests.testFollowerBehaviour(LeaderCheckerTests.java:224)	
```

Seems like an assertion message needs to be simply adjusted?

**Build scan:**
https://gradle-enterprise.elastic.co/s/dgjmkegtmtzhy/tests/:server:test/org.elasticsearch.cluster.coordination.LeaderCheckerTests/testFollowerBehaviour

**Reproduction line:**
```
./gradlew ':server:test' --tests "org.elasticsearch.cluster.coordination.LeaderCheckerTests.testFollowerBehaviour" -Dtests.seed=8C3B1DDF41962CA3 -Dtests.locale=ar-EG -Dtests.timezone=Asia/Ust-Nera -Druntime.java=20
```

**Applicable branches:**
7.17

**Reproduces locally?:**
Didn't try

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.cluster.coordination.LeaderCheckerTests&tests.test=testFollowerBehaviour

**Failure excerpt:**
```
java.lang.AssertionError: 
Expected: a string starting with "[6] consecutive checks of the master node [{leader-1}{LUl9nt39RtSPdM2L9PNAqQ}{0.0.0.0}{0.0.0.0:9}{cdfhimrsw}] were unsuccessful ([1] rejected, [5] timed out), restarting discovery; more details may be available in the master node logs [last unsuccessful check: "
     but: was "[6] consecutive checks of the master node [{leader-1}{LUl9nt39RtSPdM2L9PNAqQ}{0.0.0.0}{0.0.0.0:9}{cdfhimrsw}] were unsuccessful ([2] rejected, [4] timed out), restarting discovery; more details may be available in the master node logs [last unsuccessful check: simulated error]"

  at __randomizedtesting.SeedInfo.seed([8C3B1DDF41962CA3:C00696D508BE1D48]:0)
  at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
  at org.junit.Assert.assertThat(Assert.java:956)
  at org.junit.Assert.assertThat(Assert.java:923)
  at org.elasticsearch.cluster.coordination.LeaderCheckerTests.lambda$testFollowerBehaviour$1(LeaderCheckerTests.java:170)
  at org.elasticsearch.cluster.coordination.LeaderChecker$CheckScheduler$2.run(LeaderChecker.java:375)
  at org.elasticsearch.common.util.concurrent.DeterministicTaskQueue.runTask(DeterministicTaskQueue.java:144)
  at org.elasticsearch.common.util.concurrent.DeterministicTaskQueue.runRandomTask(DeterministicTaskQueue.java:138)
  at org.elasticsearch.common.util.concurrent.DeterministicTaskQueue.runAllRunnableTasks(DeterministicTaskQueue.java:88)
  at org.elasticsearch.cluster.coordination.LeaderCheckerTests.testFollowerBehaviour(LeaderCheckerTests.java:224)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
  at java.lang.reflect.Method.invoke(Method.java:578)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:49)
  at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
  at org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:48)
  at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
  at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:41)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
  at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
  at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:54)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:1623)

```
server/src/test/java/org/elasticsearch/cluster/coordination/LeaderCheckerTests.java
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0 and the Server Side Public License, v 1; you may not use this file except
 * in compliance with, at your election, the Elastic License 2.0 or the Server
 * Side Public License, v 1.
 */
package org.elasticsearch.cluster.coordination;
import org.elasticsearch.Build;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.Version;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.coordination.LeaderChecker.LeaderCheckRequest;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.node.TestDiscoveryNode;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.DeterministicTaskQueue;
import org.elasticsearch.monitor.StatusInfo;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.EqualsHashCodeTestUtils;
import org.elasticsearch.test.EqualsHashCodeTestUtils.CopyFunction;
import org.elasticsearch.test.transport.CapturingTransport;
import org.elasticsearch.test.transport.MockTransport;
import org.elasticsearch.threadpool.ThreadPool.Names;
import org.elasticsearch.transport.AbstractSimpleTransportTestCase;
import org.elasticsearch.transport.ConnectTransportException;
import org.elasticsearch.transport.ReceiveTimeoutTransportException;