Repository navigation
CAMEL-24485: windows-validator - stop killing slow-but-passing PowerShell suite runs - #26568
Conversation
…hell suite runs The windows-validator job failed in 33 of 54 completed runs. 19 of those were surefire fork timeouts: WebsiteInstallTest$WindowsPowerShell takes 10-20 minutes on windows-latest (626s-1198s across passing runs) against camel-launcher's 1200s forkTimeout, so slow runs were killed. The "Connection reset" in the log is the Develocity event socket dying with the killed fork, not a network problem. - Raise the fork timeout to 2700s for this job's test step only, and cap the job at 60 minutes so a real hang still fails fast. - Upload surefire reports, and print one timing line per spawned process from the fixture; surefire streams that live, so it survives a fork kill where no XML report is written. - Pass TEMP/TMP through and point PSModuleAnalysisCachePath at one shared file: every test gives PowerShell a fresh LOCALAPPDATA, so each launch would rebuild its module analysis cache. - Route every helper process through a bounded WebsiteInstallerFixture.execute(): readAllBytes() before waitFor(30s) blocks until the pipe closes, so the timeout never applied (the POSIX assertVersionInstalled had no timeout at all). _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._
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 1 tested, 0 compile-only — current: 1 all testedMaveniverse Scalpel detected 1 affected modules (current approach: 1).
|
| Module | Duration | Status |
|---|---|---|
| Camel :: Launcher | 43.5s | SUCCESS |
| Camel :: Launcher :: Container | 0.9s | SUCCESS |
Top 20 slowest modules:
Camel :: Launcher(43.5s)Camel :: Launcher :: Container(0.9s)
…ll.ps1 on Windows Follow-up to CAMEL-24485 (#26568). The WindowsPowerShell suite in windows-validator still took ~1200s, with 99% of it in the 46 install.ps1 launches (median 25.4s each). WebsiteInstallerFixture clears the child environment, and with PSModulePath unset (or pointing at Windows PowerShell's built-in module directory) the first cmdlet call in install.ps1 spends ~18s on windows-latest scanning Program Files\WindowsPowerShell\Modules (AWSPowerShell, Microsoft.Graph, SqlServer). Pointing PSModulePath at the isolated per-test home's own empty user module directory brings that call down to 0.2s while Windows PowerShell still finds its built-in cmdlets, and keeps the suite independent of whatever modules the runner has installed. Also drops the PSModuleAnalysisCachePath setting from #26568, which the bisect showed has no effect. Result: the WindowsPowerShell suite runs in 90s (was 901-1206s), install.ps1 launches take a median of 1.96s (was 19.5-25.4s), and the windows-validator job finishes in ~5 minutes. Production is unaffected: SelfUpdateCommand only clears the installer environment under its test-only override. Closes #26609 Co-authored-by: Claude Code <noreply@anthropic.com>
Description
Fixes CAMEL-24485: the
windows-validatorjob of the Package-native validation workflow is very unstable.Root cause
Across the 62 runs of the workflow since it was added (2026-07-15 to 2026-09-17),
windows-validatorfailed in 33 of 54 completed runs. By failure signature:camel-buildtools:*-SNAPSHOTnot found in "Install camel-repackager-maven-plugin" (also hits the POSIX legs; out of scope here)The
java.net.SocketException: Connection resetquoted in the ticket is not a network problem. It is the Develocity capture thread losing its socket when surefire kills the forked JVM.The suite is not hanging, it is slow.
WebsiteInstallTest$WindowsPowerShell(38 tests) took 626s to 1198s in the runs that passed, and camel-launcher setscamel.surefire.forkTimeout=1200. 8 of the 21 passing runs finished less than 10 seconds before they would have been killed. There is no trend over time and the image (windows-2025) did not change, so the failures are just the slow end of the same distribution.Changes
-Dcamel.surefire.forkTimeout=2700, and the job getstimeout-minutes: 60so a genuine hang still fails well below GitHub's 6h default. Passing jobs took up to about 25 minutes end to end. I checked withhelp:effective-pomthat the CLI property overrides the pom value (1200 → 2700).WebsiteInstallerFixtureprints one[WebsiteInstallerFixture] <ms>: <command>line per spawned process. Surefire streams test stdout to the build log live, so the timings survive a fork kill, where no XML report is written.target/surefire-reports(if: always(), 7-day retention).LOCALAPPDATAat a new, empty home, so eachpowershell.exelaunch probably rebuilds its module analysis cache when auto-loadingExpand-Archive/Get-FileHash. The fixture now setsPSModuleAnalysisCachePathto one shared file undertarget/.TEMP/TMPthrough, so the C# compile thatinstall.ps1'sAdd-Typeruns on every launch no longer writes into the per-test home.install.ps1itself never uses the temp directory.readAllBytes()beforewaitFor(30, SECONDS). The read blocks until every holder of the pipe closes it, so the timeout never applied. The POSIXassertVersionInstalledusedwaitFor()with no timeout at all. The bounded runner thatfixture.run()already had is nowWebsiteInstallerFixture.execute(ProcessBuilder), and all 9 helper call sites use it. A helper that times out now fails the test instead of carrying on.Testing
WebsiteInstallTesthas 0 failures and 0 errors; all 37 POSIX tests pass, and the 11 reported skips are Windows-only tests. That exercises the refactoredrun()/execute()path, and the timing lines appear in the console.WebsiteInstallerFixtureTestpasses 5/5.PSModuleAnalysisCachePath(the Microsoft docs I found cover 7.x). If 5.1 ignores it, nothing breaks; there is just no speed-up. This PR's ownwindows-validatorrun is the first measurement.SelfUpdateIntegrationTestfails 6 of 8 tests locally ("unable to determine how the Camel CLI was installed"). The same 6 fail on unmodifiedmain, and the test does not call any code touched here.Opened as a draft until the Windows run on this PR produces timings.
🤖 Generated with 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.