elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
1.06k stars 24.83k forks source link

[CI] LangPainlessClientYamlTestSuiteIT test {yaml=painless/130_metric_agg/Scripted Metric Agg Total} failing #96997

Closed luigidellaquila closed 1 year ago

luigidellaquila commented 1 year ago

Build scan: https://gradle-enterprise.elastic.co/s/qrcbcmi7orzxa/tests/:modules:lang-painless:yamlRestTestV7CompatTest/org.elasticsearch.painless.LangPainlessClientYamlTestSuiteIT/test%20%7Byaml=painless%2F130_metric_agg%2FScripted%20Metric%20Agg%20Total%7D

Reproduction line:

./gradlew ':modules:lang-painless:yamlRestTestV7CompatTest' --tests "org.elasticsearch.painless.LangPainlessClientYamlTestSuiteIT.test {yaml=painless/130_metric_agg/Scripted Metric Agg Total}" -Dtests.seed=C79407721761243C -Dtests.locale=lt -Dtests.timezone=America/Virgin -Druntime.java=21

Applicable branches: main

Reproduces locally?: No

Failure history: https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.painless.LangPainlessClientYamlTestSuiteIT&tests.test=test%20%7Byaml%3Dpainless/130_metric_agg/Scripted%20Metric%20Agg%20Total%7D

Failure excerpt:

java.lang.AssertionError: Failure at [painless/130_metric_agg:58]: expected [2xx] status code but api [search] returned [400 Bad Request] [{"error":{"root_cause":[],"type":"search_phase_execution_exception","reason":"","phase":"fetch","grouped":true,"failed_shards":[],"caused_by":{"type":"script_exception","reason":"compile error","script_stack":["double total = 0; for (a in states) { total ...","                  ^---- HERE"],"script":"double total = 0; for (a in states) { total += a } return total","lang":"painless","position":{"offset":18,"start":0,"end":43},"caused_by":{"type":"illegal_argument_exception","reason":"invalid foreach loop: method [java.util.List, iterator/0] not found","stack_trace":"java.lang.IllegalArgumentException: invalid foreach loop: method [java.util.List, iterator/0] not found\n\tat org.elasticsearch.painless.PainlessScript$Script.compile(double total = 0; for (a in states) { total += a } return total:19)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitEach(DefaultSemanticAnalysisPhase.java:671)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitEach(DefaultSemanticAnalysisPhase.java:160)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.node.SEach.visit(SEach.java:53)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visit(DefaultSemanticAnalysisPhase.java:188)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitBlock(DefaultSemanticAnalysisPhase.java:329)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitBlock(DefaultSemanticAnalysisPhase.java:160)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.node.SBlock.visit(SBlock.java:37)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visit(DefaultSemanticAnalysisPhase.java:188)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.PainlessSemanticAnalysisPhase.visitFunction(PainlessSemanticAnalysisPhase.java:91)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitClass(DefaultSemanticAnalysisPhase.java:233)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.Compiler.compile(Compiler.java:216)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine$2.run(PainlessScriptEngine.java:401)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine$2.run(PainlessScriptEngine.java:397)\n\tat java.base/java.security.AccessController.doPrivileged(AccessController.java:400)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:397)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:129)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptCache.lambda$compile$0(ScriptCache.java:108)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:418)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptCache.compile(ScriptCache.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptService.compile(ScriptService.java:633)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.metrics.InternalScriptedMetric.reduce(InternalScriptedMetric.java:107)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.reduce(InternalAggregations.java:159)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.topLevelReduce(InternalAggregations.java:106)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reduceAggs(SearchPhaseController.java:635)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reducedQueryPhase(SearchPhaseController.java:598)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.QueryPhaseResultConsumer.reduce(QueryPhaseResultConsumer.java:138)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:104)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n"},"stack_trace":"org.elasticsearch.script.ScriptException: compile error\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.convertToScriptException(PainlessScriptEngine.java:498)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:409)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:129)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptCache.lambda$compile$0(ScriptCache.java:108)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:418)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptCache.compile(ScriptCache.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptService.compile(ScriptService.java:633)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.metrics.InternalScriptedMetric.reduce(InternalScriptedMetric.java:107)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.reduce(InternalAggregations.java:159)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.topLevelReduce(InternalAggregations.java:106)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reduceAggs(SearchPhaseController.java:635)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reducedQueryPhase(SearchPhaseController.java:598)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.QueryPhaseResultConsumer.reduce(QueryPhaseResultConsumer.java:138)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:104)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\nCaused by: java.lang.IllegalArgumentException: invalid foreach loop: method [java.util.List, iterator/0] not found\n\tat org.elasticsearch.painless.PainlessScript$Script.compile(double total = 0; for (a in states) { total += a } return total:19)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitEach(DefaultSemanticAnalysisPhase.java:671)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitEach(DefaultSemanticAnalysisPhase.java:160)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.node.SEach.visit(SEach.java:53)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visit(DefaultSemanticAnalysisPhase.java:188)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitBlock(DefaultSemanticAnalysisPhase.java:329)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitBlock(DefaultSemanticAnalysisPhase.java:160)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.node.SBlock.visit(SBlock.java:37)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visit(DefaultSemanticAnalysisPhase.java:188)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.PainlessSemanticAnalysisPhase.visitFunction(PainlessSemanticAnalysisPhase.java:91)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitClass(DefaultSemanticAnalysisPhase.java:233)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.Compiler.compile(Compiler.java:216)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine$2.run(PainlessScriptEngine.java:401)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine$2.run(PainlessScriptEngine.java:397)\n\tat java.base/java.security.AccessController.doPrivileged(AccessController.java:400)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:397)\n\t... 20 more\n"},"stack_trace":"Failed to execute phase [fetch], \n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:729)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.onFailure(FetchSearchPhase.java:95)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:28)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\nCaused by: org.elasticsearch.script.ScriptException: compile error\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.convertToScriptException(PainlessScriptEngine.java:498)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:409)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:129)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptCache.lambda$compile$0(ScriptCache.java:108)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:418)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptCache.compile(ScriptCache.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptService.compile(ScriptService.java:633)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.metrics.InternalScriptedMetric.reduce(InternalScriptedMetric.java:107)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.reduce(InternalAggregations.java:159)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.topLevelReduce(InternalAggregations.java:106)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reduceAggs(SearchPhaseController.java:635)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reducedQueryPhase(SearchPhaseController.java:598)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.QueryPhaseResultConsumer.reduce(QueryPhaseResultConsumer.java:138)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:104)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\t... 6 more\nCaused by: java.lang.IllegalArgumentException: invalid foreach loop: method [java.util.List, iterator/0] not found\n\tat org.elasticsearch.painless.PainlessScript$Script.compile(double total = 0; for (a in states) { total += a } return total:19)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitEach(DefaultSemanticAnalysisPhase.java:671)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitEach(DefaultSemanticAnalysisPhase.java:160)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.node.SEach.visit(SEach.java:53)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visit(DefaultSemanticAnalysisPhase.java:188)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitBlock(DefaultSemanticAnalysisPhase.java:329)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitBlock(DefaultSemanticAnalysisPhase.java:160)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.node.SBlock.visit(SBlock.java:37)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visit(DefaultSemanticAnalysisPhase.java:188)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.PainlessSemanticAnalysisPhase.visitFunction(PainlessSemanticAnalysisPhase.java:91)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitClass(DefaultSemanticAnalysisPhase.java:233)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.Compiler.compile(Compiler.java:216)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine$2.run(PainlessScriptEngine.java:401)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine$2.run(PainlessScriptEngine.java:397)\n\tat java.base/java.security.AccessController.doPrivileged(AccessController.java:400)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:397)\n\t... 20 more\n"},"status":400}]

  at __randomizedtesting.SeedInfo.seed([C79407721761243C:4FC038A8B99D49C4]:0)
  at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:572)
  at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.test(ESClientYamlSuiteTestCase.java:524)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
  at java.lang.reflect.Method.invoke(Method.java:580)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:1583)

  Caused by: java.lang.AssertionError: expected [2xx] status code but api [search] returned [400 Bad Request] [{"error":{"root_cause":[],"type":"search_phase_execution_exception","reason":"","phase":"fetch","grouped":true,"failed_shards":[],"caused_by":{"type":"script_exception","reason":"compile error","script_stack":["double total = 0; for (a in states) { total ...","                  ^---- HERE"],"script":"double total = 0; for (a in states) { total += a } return total","lang":"painless","position":{"offset":18,"start":0,"end":43},"caused_by":{"type":"illegal_argument_exception","reason":"invalid foreach loop: method [java.util.List, iterator/0] not found","stack_trace":"java.lang.IllegalArgumentException: invalid foreach loop: method [java.util.List, iterator/0] not found\n\tat org.elasticsearch.painless.PainlessScript$Script.compile(double total = 0; for (a in states) { total += a } return total:19)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitEach(DefaultSemanticAnalysisPhase.java:671)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitEach(DefaultSemanticAnalysisPhase.java:160)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.node.SEach.visit(SEach.java:53)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visit(DefaultSemanticAnalysisPhase.java:188)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitBlock(DefaultSemanticAnalysisPhase.java:329)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitBlock(DefaultSemanticAnalysisPhase.java:160)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.node.SBlock.visit(SBlock.java:37)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visit(DefaultSemanticAnalysisPhase.java:188)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.PainlessSemanticAnalysisPhase.visitFunction(PainlessSemanticAnalysisPhase.java:91)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitClass(DefaultSemanticAnalysisPhase.java:233)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.Compiler.compile(Compiler.java:216)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine$2.run(PainlessScriptEngine.java:401)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine$2.run(PainlessScriptEngine.java:397)\n\tat java.base/java.security.AccessController.doPrivileged(AccessController.java:400)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:397)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:129)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptCache.lambda$compile$0(ScriptCache.java:108)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:418)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptCache.compile(ScriptCache.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptService.compile(ScriptService.java:633)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.metrics.InternalScriptedMetric.reduce(InternalScriptedMetric.java:107)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.reduce(InternalAggregations.java:159)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.topLevelReduce(InternalAggregations.java:106)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reduceAggs(SearchPhaseController.java:635)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reducedQueryPhase(SearchPhaseController.java:598)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.QueryPhaseResultConsumer.reduce(QueryPhaseResultConsumer.java:138)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:104)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n"},"stack_trace":"org.elasticsearch.script.ScriptException: compile error\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.convertToScriptException(PainlessScriptEngine.java:498)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:409)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:129)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptCache.lambda$compile$0(ScriptCache.java:108)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:418)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptCache.compile(ScriptCache.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptService.compile(ScriptService.java:633)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.metrics.InternalScriptedMetric.reduce(InternalScriptedMetric.java:107)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.reduce(InternalAggregations.java:159)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.topLevelReduce(InternalAggregations.java:106)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reduceAggs(SearchPhaseController.java:635)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reducedQueryPhase(SearchPhaseController.java:598)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.QueryPhaseResultConsumer.reduce(QueryPhaseResultConsumer.java:138)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:104)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\nCaused by: java.lang.IllegalArgumentException: invalid foreach loop: method [java.util.List, iterator/0] not found\n\tat org.elasticsearch.painless.PainlessScript$Script.compile(double total = 0; for (a in states) { total += a } return total:19)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitEach(DefaultSemanticAnalysisPhase.java:671)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitEach(DefaultSemanticAnalysisPhase.java:160)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.node.SEach.visit(SEach.java:53)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visit(DefaultSemanticAnalysisPhase.java:188)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitBlock(DefaultSemanticAnalysisPhase.java:329)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitBlock(DefaultSemanticAnalysisPhase.java:160)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.node.SBlock.visit(SBlock.java:37)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visit(DefaultSemanticAnalysisPhase.java:188)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.PainlessSemanticAnalysisPhase.visitFunction(PainlessSemanticAnalysisPhase.java:91)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitClass(DefaultSemanticAnalysisPhase.java:233)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.Compiler.compile(Compiler.java:216)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine$2.run(PainlessScriptEngine.java:401)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine$2.run(PainlessScriptEngine.java:397)\n\tat java.base/java.security.AccessController.doPrivileged(AccessController.java:400)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:397)\n\t... 20 more\n"},"stack_trace":"Failed to execute phase [fetch], \n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:729)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.onFailure(FetchSearchPhase.java:95)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:28)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\nCaused by: org.elasticsearch.script.ScriptException: compile error\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.convertToScriptException(PainlessScriptEngine.java:498)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:409)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:129)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptCache.lambda$compile$0(ScriptCache.java:108)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.cache.Cache.computeIfAbsent(Cache.java:418)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptCache.compile(ScriptCache.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.script.ScriptService.compile(ScriptService.java:633)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.metrics.InternalScriptedMetric.reduce(InternalScriptedMetric.java:107)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.reduce(InternalAggregations.java:159)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.search.aggregations.InternalAggregations.topLevelReduce(InternalAggregations.java:106)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reduceAggs(SearchPhaseController.java:635)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.SearchPhaseController.reducedQueryPhase(SearchPhaseController.java:598)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.QueryPhaseResultConsumer.reduce(QueryPhaseResultConsumer.java:138)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase.innerRun(FetchSearchPhase.java:104)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.action.search.FetchSearchPhase$1.doRun(FetchSearchPhase.java:90)\n\tat org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\t... 6 more\nCaused by: java.lang.IllegalArgumentException: invalid foreach loop: method [java.util.List, iterator/0] not found\n\tat org.elasticsearch.painless.PainlessScript$Script.compile(double total = 0; for (a in states) { total += a } return total:19)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitEach(DefaultSemanticAnalysisPhase.java:671)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitEach(DefaultSemanticAnalysisPhase.java:160)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.node.SEach.visit(SEach.java:53)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visit(DefaultSemanticAnalysisPhase.java:188)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitBlock(DefaultSemanticAnalysisPhase.java:329)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitBlock(DefaultSemanticAnalysisPhase.java:160)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.node.SBlock.visit(SBlock.java:37)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visit(DefaultSemanticAnalysisPhase.java:188)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.PainlessSemanticAnalysisPhase.visitFunction(PainlessSemanticAnalysisPhase.java:91)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.phase.DefaultSemanticAnalysisPhase.visitClass(DefaultSemanticAnalysisPhase.java:233)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.Compiler.compile(Compiler.java:216)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine$2.run(PainlessScriptEngine.java:401)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine$2.run(PainlessScriptEngine.java:397)\n\tat java.base/java.security.AccessController.doPrivileged(AccessController.java:400)\n\tat org.elasticsearch.painless@8.9.0-SNAPSHOT/org.elasticsearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:397)\n\t... 20 more\n"},"status":400}]

    at org.junit.Assert.fail(Assert.java:88)
    at org.elasticsearch.test.rest.yaml.section.DoSection.execute(DoSection.java:372)
    at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:552)
    at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.test(ESClientYamlSuiteTestCase.java:524)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke(Method.java:580)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
    at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
    at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
    at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
    at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
    at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
    at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
    at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
    at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
    at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
    at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
    at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
    at java.lang.Thread.run(Thread.java:1583)
elasticsearchmachine commented 1 year ago

Pinging @elastic/es-core-infra (Team:Core/Infra)

stu-elastic commented 1 year ago

Looks like there's something different in Java 21, works fine in Java 20 and the failure history is all Java 21.

stu-elastic commented 1 year ago

I had to install Java 21 and update gradle.properties, but this reproduces.

diff --git a/gradle.properties b/gradle.properties
index ac5f070bebc..5aad65317ba 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -12,7 +12,7 @@ systemProp.jdk.tls.client.protocols=TLSv1.2

 # java homes resolved by environment variables
 org.gradle.java.installations.auto-detect=false
-org.gradle.java.installations.fromEnv=JAVA_TOOLCHAIN_HOME,JAVA_HOME,RUNTIME_JAVA_HOME,JAVA20_HOME,JAVA19_HOME,JAVA18_HOME,JAVA17_HOME,JAVA16_HOME,JAVA15_HOME,JAVA14_HOME,JAVA13_HOME,JAVA12_HOME,JAVA11_HOME,JAVA8_HOME
+org.gradle.java.installations.fromEnv=JAVA_TOOLCHAIN_HOME,JAVA_HOME,RUNTIME_JAVA_HOME,JAVA20_HOME,JAVA19_HOME,JAVA18_HOME,JAVA17_HOME,JAVA16_HOME,JAVA15_HOME,JAVA14_HOME,JAVA13_HOME,JAVA12_HOME,JAVA11_HOME,JAVA8_HOME,JAVA21_HOME

 # log some dependency verification info to console
 org.gradle.dependency.verification.console=verbose
stu-elastic commented 1 year ago

https://github.com/elastic/elasticsearch/pull/96932 added java 21 EA to test, it seems to break several painless tests.

stu-elastic commented 1 year ago

Fixed by #97062