From 20dc8556440eed7ee95f34fadf3a2f222a8b108b Mon Sep 17 00:00:00 2001 From: Yannick Welsch Date: Wed, 16 Dec 2015 11:27:45 +0100 Subject: [PATCH] [TEST] Fix ScriptServiceTests.testFineGrainedSettings that can loop indefinitely --- .../test/java/org/elasticsearch/script/ScriptServiceTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java b/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java index 23cada02c6c..5abdc4f79bb 100644 --- a/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java +++ b/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java @@ -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 engineSettings = new HashMap<>(); for (int i = 0; i < numEngineSettings; i++) { String settingKey;