Don't use forbidden API in test

This commit is contained in:
Simon Willnauer 2015-07-06 22:56:32 +02:00
parent 04c5dab3d9
commit 3906ff950c
1 changed files with 3 additions and 2 deletions

View File

@ -27,6 +27,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.test.ElasticsearchTestCase;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
public class PriorityComparatorTests extends ElasticsearchTestCase {
@ -39,9 +40,9 @@ public class PriorityComparatorTests extends ElasticsearchTestCase {
for (int i = 0; i < indices.length; i++) {
if (frequently()) {
indices[i] = new IndexMeta("idx_2015_04_" + String.format("%02d", i), randomIntBetween(1, 1000), randomIntBetween(1, 10000));
indices[i] = new IndexMeta("idx_2015_04_" + String.format(Locale.ROOT, "%02d", i), randomIntBetween(1, 1000), randomIntBetween(1, 10000));
} else { // sometimes just use defaults
indices[i] = new IndexMeta("idx_2015_04_" + String.format("%02d", i));
indices[i] = new IndexMeta("idx_2015_04_" + String.format(Locale.ROOT, "%02d", i));
}
map.put(indices[i].name, indices[i]);
}