Describe the bug
See the test failure: https://build.ci.opensearch.org/job/gradle-check/28158/testReport/junit/org.opensearch.indices.replication/SegmentReplicationAllocationIT/testSingleIndexShardAllocation/
To Reproduce
REPRODUCE WITH: ./gradlew ':server:internalClusterTest' --tests "org.opensearch.indices.replication.SegmentReplicationAllocationIT.testSingleIndexShardAllocation" -Dtests.seed=7F70CFAC7DF5CE33 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=tr -Dtests.timezone=Asia/Oral -Druntime.java=17
Expected behavior
Fix the flaky test.