From f130d60b729b20d70ca90598e40826089654a2b6 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Thu, 24 Jul 2014 11:33:32 +0200 Subject: [PATCH] [TEST] Don't randomize preference PRIMARY it might not try replicas depending on the clusterstate --- .../java/org/elasticsearch/test/client/RandomizingClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/elasticsearch/test/client/RandomizingClient.java b/src/test/java/org/elasticsearch/test/client/RandomizingClient.java index 6c9283986fa..105fece4cd0 100644 --- a/src/test/java/org/elasticsearch/test/client/RandomizingClient.java +++ b/src/test/java/org/elasticsearch/test/client/RandomizingClient.java @@ -46,7 +46,7 @@ public class RandomizingClient extends FilterClient { SearchType.DFS_QUERY_THEN_FETCH, SearchType.QUERY_THEN_FETCH)); if (random.nextInt(10) == 0) { - defaultPreference = RandomPicks.randomFrom(random, EnumSet.of(Preference.PRIMARY_FIRST, Preference.PRIMARY, Preference.LOCAL)).type(); + defaultPreference = RandomPicks.randomFrom(random, EnumSet.of(Preference.PRIMARY_FIRST, Preference.LOCAL)).type(); } else if (random.nextInt(10) == 0) { String s = TestUtil.randomRealisticUnicodeString(random, 1, 10); defaultPreference = s.startsWith("_") ? null : s; // '_' is a reserved character