Avoid use of forbidden method in test
This commit is contained in:
parent
7cf94b0d90
commit
f8415ae7ca
|
@ -413,7 +413,7 @@ public class ScriptServiceTests extends ESTestCase {
|
||||||
buildScriptService(Settings.EMPTY);
|
buildScriptService(Settings.EMPTY);
|
||||||
int numberOfCompilations = randomIntBetween(1, 1024);
|
int numberOfCompilations = randomIntBetween(1, 1024);
|
||||||
for (int i = 0; i < numberOfCompilations; i++) {
|
for (int i = 0; i < numberOfCompilations; i++) {
|
||||||
scriptService.compile(new Script(String.format("%d+%d", i, i), ScriptType.INLINE, "test", null), randomFrom(scriptContexts));
|
scriptService.compile(new Script(i + " + " + i, ScriptType.INLINE, "test", null), randomFrom(scriptContexts));
|
||||||
}
|
}
|
||||||
assertEquals(numberOfCompilations, scriptService.stats().getCompilations());
|
assertEquals(numberOfCompilations, scriptService.stats().getCompilations());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue