[TEST] fix random preference string test to accomodate for the new more strict preference type
This commit is contained in:
parent
0173298f29
commit
4fb79fe787
|
@ -47,8 +47,14 @@ public class SimpleCountTests extends ElasticsearchIntegrationTest {
|
||||||
|
|
||||||
int iters = scaledRandomIntBetween(10, 100);
|
int iters = scaledRandomIntBetween(10, 100);
|
||||||
for (int i = 0; i < iters; i++) {
|
for (int i = 0; i < iters; i++) {
|
||||||
|
|
||||||
|
String randomPreference = randomUnicodeOfLengthBetween(0, 4);
|
||||||
|
// randomPreference should not start with '_' (reserved for known preference types (e.g. _shards, _primary)
|
||||||
|
while (randomPreference.startsWith("_")) {
|
||||||
|
randomPreference = randomUnicodeOfLengthBetween(0, 4);
|
||||||
|
}
|
||||||
// id is not indexed, but lets see that we automatically convert to
|
// id is not indexed, but lets see that we automatically convert to
|
||||||
CountResponse countResponse = client().prepareCount().setQuery(QueryBuilders.matchAllQuery()).setPreference(randomUnicodeOfLengthBetween(0, 4)).get();
|
CountResponse countResponse = client().prepareCount().setQuery(QueryBuilders.matchAllQuery()).setPreference(randomPreference).get();
|
||||||
assertHitCount(countResponse, 6l);
|
assertHitCount(countResponse, 6l);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue