From b53453aed14cac0cc07a733dd1ebc4045b1cee85 Mon Sep 17 00:00:00 2001 From: Eric Wei Date: Thu, 20 Aug 2026 04:15:27 +0000 Subject: [PATCH] test(integ-test): exclude analytics-engine and Prometheus suites from integTestRemote integTestRemote runs against an externally provided cluster, so it can neither install plugins nor set node-level settings. Two groups of suites depend on one of those and are still selected by it, so they fail during setup instead of being skipped. Analytics-engine suites. AnalyticsEngineCompatIT, AnalyticsEngineSecurityIT and AnalyticsEngineProfileIT create composite (parquet-backed) indices and depend on opensearch.experimental.feature.pluggable.dataformat.enabled and opensearch.experimental.feature.transport.stream.enabled. Each has a dedicated task whose testClusters block provisions that stack. These are added as an else branch on the existing analyticsEnabled gate so that all analytics-engine filtering for this task stays in one place. AnalyticsEngineSecurityIT is also the slowest suite in the run: its setup polls the security configuration API 60 times at one second intervals and only marks itself initialised on success, so every test method repeats the full wait before failing. Prometheus suites. integTest already skips PrometheusDataSourceCommandsIT, ShowDataSourcesCommandIT and InformationSchemaCommandIT when the caller passes -DignorePrometheus, and on Windows where Prometheus is not started. integTestRemote now honours the same condition; the block and its comment are taken from integTest unchanged. Both groups stay gated, so default behaviour does not change: the else branch is only taken when analyticsEnabled is false, the Prometheus group is opt-in through the existing flag, and the dedicated analyticsEngine*IT tasks are untouched. The security package is deliberately not excluded. Whether those suites can run depends on the cluster integTestRemote is pointed at -- it forwards https, user and password precisely so it can target a secured cluster -- so a build-time exclusion would remove a supported configuration. That case needs a runtime capability check instead. Signed-off-by: Eric Wei --- integ-test/build.gradle | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/integ-test/build.gradle b/integ-test/build.gradle index 4a071bfefe6..b010035fd21 100644 --- a/integ-test/build.gradle +++ b/integ-test/build.gradle @@ -1354,6 +1354,20 @@ task integTestRemote(type: RestIntegTestTask) { // - STREAMSTATS_SORT_NOT_HONORED: streamstats computes its window over the backend scan // order, ignoring a preceding `| sort` (the OVER clause has no explicit ORDER BY). excludeTestsMatching '*CalciteStreamstatsCommandIT.testStreamstatsAndSort' + } else { + // Suites that require the analytics-engine plugin stack. They create composite + // (parquet-backed) indices and depend on the node-level settings + // opensearch.experimental.feature.pluggable.dataformat.enabled and + // opensearch.experimental.feature.transport.stream.enabled. Each already has a + // dedicated task whose testClusters block provisions that stack -- + // :analyticsEngineCompatIT, :analyticsEngineSecurityIT and :analyticsEngineProfileIT -- + // whereas integTestRemote runs against an externally provided cluster and can neither + // install plugins nor set node settings, so they fail during setup instead of being + // skipped. Gated here rather than listed with the exclusions below so that all + // analytics-engine filtering for this task stays in one place. + excludeTestsMatching 'org.opensearch.sql.plugin.AnalyticsEngineCompatIT' + excludeTestsMatching 'org.opensearch.sql.security.AnalyticsEngineSecurityIT' + excludeTestsMatching 'org.opensearch.sql.analytics.AnalyticsEngineProfileIT' } } @@ -1366,4 +1380,14 @@ task integTestRemote(type: RestIntegTestTask) { exclude 'org/opensearch/sql/legacy/QueryAnalysisIT.class' exclude 'org/opensearch/sql/legacy/OrderIT.class' exclude 'org/opensearch/sql/jdbc/**' + + // Suites that query a Prometheus datasource and so need a running Prometheus instance. + // integTest applies the same condition (it starts Prometheus itself unless -DignorePrometheus + // is passed, and never on Windows); this task honours the flag so a caller pointing it at an + // environment without Prometheus gets the suites skipped rather than failing during setup. + if(getOSFamilyType() == "windows" || ignorePrometheus) { + exclude 'org/opensearch/sql/ppl/PrometheusDataSourceCommandsIT.class' + exclude 'org/opensearch/sql/ppl/ShowDataSourcesCommandIT.class' + exclude 'org/opensearch/sql/ppl/InformationSchemaCommandIT.class' + } }