Adriano Machado created CAMEL-24829:
---------------------------------------
Summary: windows-validator: each install.ps1 test launch costs
~24s, keeping the PowerShell suite near 20 minutes
Key: CAMEL-24829
URL: https://issues.apache.org/jira/browse/CAMEL-24829
Project: Camel
Issue Type: Test
Components: camel-jbang
Reporter: Adriano Machado
Follow-up to CAMEL-24485, which stopped the {{windows-validator}} job
(Package-native validation workflow) from killing slow-but-passing runs by
raising its surefire fork timeout to 2700s. The suite is still slow; this
ticket is about why.
*Measurement* (PR #26568's own run,
[35311803871|https://github.com/apache/camel/actions/runs/35311803871], using
the per-process timing lines that PR added):
||Process||Count||Total||Median||Max||
|install.ps1|46|1192 s (99%)|25.4 s|51.6 s|
|powershell -Command registry helpers|43|10.3 s|0.24 s|0.3 s|
|camel.cmd shim calls|10|0.4 s|0.03 s|0.04 s|
{{WebsiteInstallTest$WindowsPowerShell}} took 1206 s, i.e. it would have been
killed under the old 1200 s limit.
*Observations*
* PowerShell startup is cheap: the {{powershell -Command}} helpers take ~0.24
s, and {{install.ps1 -Version}} (missing value, rejected at parameter binding)
takes 0.3 s.
* Every {{install.ps1}} launch that reaches the script body pays ~24 s
regardless of work: {{-Version 1.2.3-SNAPSHOT}} is rejected at install.ps1 line
~314 without any network I/O and still takes 24.1 s.
* Everything before that line is function definitions plus the test-only
CA-certificate block (install.ps1 lines ~52-104), which runs {{Add-Type}}
(csc.exe) on every launch under Windows PowerShell 5.1. Production installs
never set {{CAMEL_INSTALL_CA_CERT}}, so this path is likely test-only.
* Secondary suspect: {{WebsiteInstallerFixture.run()}} clears the child
environment, while the fast helpers inherit the full one.
* The PSModuleAnalysisCachePath and TEMP/TMP passthrough shipped in CAMEL-24485
had no measurable effect.
*Plan*
# Confirm the suspect with a diagnostic Windows CI step (Add-Type and
install.ps1 timed with and without the CA seam, full vs cleared environment).
# Fix the test-side cost accordingly (for example compile the validator once
and load it, or serve most tests over http:// and keep HTTPS for the
TLS-specific tests), then consider lowering the 2700 s timeout again.
*Related test-validity issue found in the same investigation*
{{WebsiteInstallTest$WindowsPowerShell.rejectsUnknownParameter}} runs
{{install.ps1 -Bogus value}} and expects a non-zero exit. install.ps1's
{{param()}} has no {{[CmdletBinding()]}} and never checks {{$args}}, so the
unknown argument is silently ignored; the test only passes because the
unpublished latest manifest returns 404.
_Claude Code on behalf of Adriano Machado (@ammachado)_
_This was generated by an AI agent and may contain inaccuracies. Please verify
before relying on it._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)