[TEST] Fix ScriptServiceTests.testFineGrainedSettings that can loop indefinitely

This commit is contained in:
Yannick Welsch 2015-12-16 11:27:45 +01:00
parent 015ead0c45
commit 20dc855644
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ public class ScriptServiceTests extends ESTestCase {
} while (scriptContextSettings.containsKey(scriptContext));
scriptContextSettings.put(scriptContext, randomFrom(ScriptMode.values()));
}
int numEngineSettings = randomIntBetween(0, 10);
int numEngineSettings = randomIntBetween(0, ScriptType.values().length * scriptContexts.length);
Map<String, ScriptMode> engineSettings = new HashMap<>();
for (int i = 0; i < numEngineSettings; i++) {
String settingKey;