You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2021/07/22 17:17:28 UTC
[pulsar] branch master updated: [Tests] Fix flaky Presto tiered
storage integration tests (#11425)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 0ae0d9e [Tests] Fix flaky Presto tiered storage integration tests (#11425)
0ae0d9e is described below
commit 0ae0d9e7c6fa1b21765431c4e94aaac5ac3e11de
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Thu Jul 22 20:16:26 2021 +0300
[Tests] Fix flaky Presto tiered storage integration tests (#11425)
---
.../pulsar/tests/integration/presto/TestPulsarSQLBase.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/presto/TestPulsarSQLBase.java b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/presto/TestPulsarSQLBase.java
index 54b82fb..026a32d 100644
--- a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/presto/TestPulsarSQLBase.java
+++ b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/presto/TestPulsarSQLBase.java
@@ -27,6 +27,7 @@ import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Timestamp;
+import java.time.Duration;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -175,7 +176,14 @@ public class TestPulsarSQLBase extends PulsarSQLTestSuite {
queryAllDataSql = String.format("select * from pulsar.\"%s\".\"%s\";", namespace, topic);
}
- Awaitility.await().untilAsserted(
+ Awaitility.await()
+ // first poll immediately
+ .pollDelay(Duration.ofMillis(0))
+ // use relatively long poll interval so that polling doesn't consume too much resources
+ .pollInterval(Duration.ofSeconds(3))
+ // retry up to 15 seconds from first attempt
+ .atMost(Duration.ofSeconds(15))
+ .untilAsserted(
() -> {
ContainerExecResult containerExecResult = execQuery(queryAllDataSql);
assertThat(containerExecResult.getExitCode()).isEqualTo(0);