Skip to content

Commit 404d61c

Browse files
authored
ESQL: Fix DateDiffTests suite timeout (#138657)
Fixes #138617 The amount of cases on DateDiffTests (Similar to DateTruncTests) sometimes lead to a timeout. The suite takes around 10 minutes in (my) local tests, 20.000 tests, which will sometimes surpass the 20 min limit in CI
1 parent 0a94dc0 commit 404d61c

File tree

1 file changed

+4
-0
lines changed
  • x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/date

1 file changed

+4
-0
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateDiffTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
import com.carrotsearch.randomizedtesting.annotations.Name;
1111
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
12+
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
1213

14+
import org.apache.lucene.tests.util.TimeUnits;
1315
import org.apache.lucene.util.BytesRef;
1416
import org.elasticsearch.common.time.DateUtils;
1517
import org.elasticsearch.xpack.esql.core.expression.Expression;
@@ -31,6 +33,8 @@
3133
import static org.hamcrest.Matchers.equalTo;
3234
import static org.hamcrest.Matchers.startsWith;
3335

36+
// The amount of cases sometimes exceed the 20 minutes
37+
@TimeoutSuite(millis = 60 * TimeUnits.MINUTE)
3438
public class DateDiffTests extends AbstractConfigurationFunctionTestCase {
3539
public DateDiffTests(@Name("TestCase") Supplier<TestCaseSupplier.TestCase> testCaseSupplier) {
3640
this.testCase = testCaseSupplier.get();

0 commit comments

Comments
 (0)