SOLR-12801: completely prevent tlog replicas from being used.

This follows the spirit of the change Mark intended in his previous commit to this test, but his solution wasn't covering all cases on backcompat to branch_7x

(see also: SOLR-12313)

(cherry picked from commit e2b8b0e5b1)
This commit is contained in:
Chris Hostetter 2019-01-25 10:18:55 -07:00
parent 93b740445b
commit 0ba2233eea
1 changed files with 3 additions and 2 deletions

View File

@ -44,7 +44,8 @@ import com.carrotsearch.randomizedtesting.annotations.Nightly;
@Nightly // this test is currently too slow for non nightly
public class ForceLeaderTest extends HttpPartitionTest {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private final boolean onlyLeaderIndexes = random().nextBoolean();
// TODO: SOLR-12313 tlog replicas makes commits take way to long due to what is likely a bug and it's TestInjection use
private final boolean onlyLeaderIndexes = random().nextBoolean() && false; // consume same amount of random
@BeforeClass
public static void beforeClassSetup() {
@ -57,7 +58,7 @@ public class ForceLeaderTest extends HttpPartitionTest {
@Override
protected boolean useTlogReplicas() {
return false; // TODO: tlog replicas makes commits take way to long due to what is likely a bug and it's TestInjection use
return onlyLeaderIndexes;
}
@Test