Skip to content

Commit

Permalink
Increase timeout for runaway regex test and reenable
Browse files Browse the repository at this point in the history
Couldn't reproduce the flaky failure, but guessing that it's due to
hitting the optimizer timeout before getting to the regular expression
matching (e.g. gc in the test environment made things slow). Increasing
the analyzer timeout should make the test more reliable.

Fixes: #20764
  • Loading branch information
rschlussel committed Mar 22, 2024
1 parent 35fc350 commit c4a8f0e
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,11 @@ public void testExplainAnalyzeDDL()
computeActual("EXPLAIN ANALYZE DROP TABLE orders");
}

// Flaky test: https://github.com/prestodb/presto/issues/20764
@Test(expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = "Regexp matching interrupted", timeOut = 30_000, enabled = false)
@Test(expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = "Regexp matching interrupted", timeOut = 30_000)
public void testRunawayRegexAnalyzerTimeout()
{
Session session = Session.builder(getSession())
.setSystemProperty(SystemSessionProperties.QUERY_ANALYZER_TIMEOUT, "1s")
.setSystemProperty(SystemSessionProperties.QUERY_ANALYZER_TIMEOUT, "5s")
.build();

computeActual(session, "select REGEXP_EXTRACT('runaway_regex-is-evaluated-infinitely - xxx\"}', '.*runaway_(.*?)+-+xxx.*')");
Expand Down

0 comments on commit c4a8f0e

Please sign in to comment.