AnalyticsEngineCompatIT is a coexistence smoke test meant to run only in the
dedicated :integ-test:analyticsEngineCompatIT task, which bundles the
analytics-engine plugin stack. The distribution integ-test pipeline, however,
scans every *IT class against the built distribution and runs it with the
security plugin enabled and without analytics-engine. There it fails during
REST client init with "ConnectionClosedException: Connection closed by peer",
because the test extends a bare OpenSearchRestTestCase that speaks plain HTTP
to the TLS-secured port. A build.gradle exclude does not cover that pipeline.
Make the test self-inert regardless of how it is discovered:
- Extend OpenSearchSQLRestTestCase so the REST client honours the https/user/
password system properties of a secured cluster.
- Skip via an assumption when the analytics-engine plugin is not installed, so
a build without the plugin reports the test as skipped rather than failed.
Signed-off-by: Kai Huang <ahkcs@amazon.com>
Backport of #5510 to the
3.7branch.Description
AnalyticsEngineCompatITis a coexistence smoke test whose only assertion is that the cluster boots. It is meant to run only in the dedicated:integ-test:analyticsEngineCompatITGradle task, which bundles the arrow + analytics-engine plugin stack on a non-security cluster.The distribution integ-test pipeline behaves differently: it scans every
*ITclass against the built distribution and runs thewith-securityvariant without the analytics-engine plugin. In that lane the test fails before any test body runs:Root cause: the test extends a bare
OpenSearchRestTestCase, which speaks plain HTTP. Against a TLS-secured cluster the security plugin closes the connection during client init. The existingbuild.gradleexclude only governs this repo's ownintegTesttask — it does not cover the external distribution pipeline that discovers the class generically.Fix
Make the test self-inert no matter how it is discovered:
OpenSearchSQLRestTestCaseso the REST client honours thehttps/user/passwordsystem properties of a secured cluster (TLS trust + basic auth), instead of failing the connection.assumeTrue) when the analytics-engine plugin is not installed — verified through_cat/plugins. A build without the plugin now reports the test as skipped rather than failed.Resulting behaviour:
analyticsEngineCompatITtask (plugin present)Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.