This is an automated email from the ASF dual-hosted git repository.
yqm pushed a commit to branch 37.0.0
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/37.0.0 by this push:
new e711b758b1a flaky
e711b758b1a is described below
commit e711b758b1aa1a0fb745a049534afb662e96878d
Author: cecemei <[email protected]>
AuthorDate: Thu Apr 16 11:11:48 2026 -0700
flaky
---
web-console/e2e-tests/tutorial-batch.spec.ts | 14 ++++++++++----
web-console/e2e-tests/util/retry.ts | 18 ++++++++++++++++++
web-console/script/druid | 3 ++-
3 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/web-console/e2e-tests/tutorial-batch.spec.ts
b/web-console/e2e-tests/tutorial-batch.spec.ts
index 59ac0a40781..e917ba5af20 100644
--- a/web-console/e2e-tests/tutorial-batch.spec.ts
+++ b/web-console/e2e-tests/tutorial-batch.spec.ts
@@ -31,7 +31,7 @@ import { QueryOverview } from './component/query/overview';
import { saveScreenshotIfError } from './util/debug';
import { DRUID_EXAMPLES_QUICKSTART_TUTORIAL_DIR, UNIFIED_CONSOLE_URL } from
'./util/druid';
import { createBrowser, createPage } from './util/playwright';
-import { retryIfJestAssertionError } from './util/retry';
+import { retryIfJestAssertionError, retryOnAnyError } from './util/retry';
import { waitTillWebConsoleReady } from './util/setup';
jest.setTimeout(5 * 60 * 1000);
@@ -168,9 +168,15 @@ async function validateDatasourceStatus(page:
playwright.Page, datasourceName: s
async function validateQuery(page: playwright.Page, datasourceName: string) {
const queryOverview = new QueryOverview(page, UNIFIED_CONSOLE_URL);
const query = `SELECT * FROM ${T(datasourceName)} ORDER BY __time`;
- const results = await queryOverview.runQuery(query);
- expect(results).toBeDefined();
- expect(results.length).toBeGreaterThan(0);
+ let results!: string[][];
+ await retryOnAnyError(
+ async () => {
+ results = await queryOverview.runQuery(query);
+ expect(results.length).toBeGreaterThan(0);
+ },
+ 1000,
+ 3,
+ );
expect(results[0]).toStrictEqual([
/* __time */ '2015-09-12T00:46:58.772Z',
/* time */ '2015-09-12T00:46:58.771Z',
diff --git a/web-console/e2e-tests/util/retry.ts
b/web-console/e2e-tests/util/retry.ts
index 63360dbf381..b077ebda8c7 100644
--- a/web-console/e2e-tests/util/retry.ts
+++ b/web-console/e2e-tests/util/retry.ts
@@ -41,3 +41,21 @@ export async function retryIfJestAssertionError(
}
}
}
+
+export async function retryOnAnyError(callback: () => Promise<void>, msec =
1000, maxTries = 60) {
+ let i = 0;
+
+ while (true) {
+ try {
+ await callback();
+ return;
+ } catch (e) {
+ i++;
+ if (i < maxTries) {
+ await sleep(msec);
+ } else {
+ throw e;
+ }
+ }
+ }
+}
diff --git a/web-console/script/druid b/web-console/script/druid
index 47a0c607ea5..dfb9d49ce1a 100755
--- a/web-console/script/druid
+++ b/web-console/script/druid
@@ -115,7 +115,8 @@ function start() {
fi
export DRUID_SKIP_JAVA_CHECK=1 # Make it simpler to develop the web console
when localhost is on JDK11
-
"$(_get_code_root)/distribution/target/apache-druid-$(_get_druid_version)/bin/start-druid"
-m 16g > /dev/null &
+ mkdir -p
"$(_get_code_root)/distribution/target/apache-druid-$(_get_druid_version)/log"
+
"$(_get_code_root)/distribution/target/apache-druid-$(_get_druid_version)/bin/start-druid"
-m 16g >
"$(_get_code_root)/distribution/target/apache-druid-$(_get_druid_version)/log/start-druid.log"
2>&1 &
local pid="$!"
echo "$pid" > "$DRUID_PID_FILE"
_log "Druid started with pid ${pid}"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]