perf(test): remove real-time waits and per-iteration content types in slow ITs (#36912) - #36913
Conversation
… slow ITs (#36912) - StartEndScheduledExperimentsJobTest: compress scheduling windows from minutes to seconds; sleep 25s instead of 120s - JobQueueManagerAPIIntegrationTest: trigger AbandonedJobDetector directly instead of waiting up to 1 minute for its scheduled tick; latch timeout 3min -> 30s. Makes detectAbandonedJobs() public to allow on-demand scans. - TagAPITest: create one content type instead of ~100 in the findTopTags loop (was ~100 ES update_mapping calls polluting the shared index mapping) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Claude finished @wezell's task in 3m 32s —— View job Code Review
New IssuesNo issues found. Notes (non-blocking)
The lone production change (visibility only, no logic) is well-documented in the Javadoc. Approving-quality change. |
|
Tick the box to add this pull request to the merge queue (same as
|
…ments job test (#36912) Replace the fixed 25s Thread.sleep with an Awaitility loop that re-runs StartEndScheduledExperimentsJob (idempotent, same as Quartz re-firing) every 2s until both scheduling transitions land. Completes as soon as the dates pass (~20s) and tolerates slow fixture creation up to a 40s cap. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…test (#36912) The cap is failure-path only — the poll exits as soon as both transitions land (~20s) — so size it generously for slow CI runners. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Proposed Changes
Fixes three of the slowest integration-test hotspots identified from per-class CI timing analysis (run 31054926456). ~4.5 min of aggregate IT time recovered, all behavior-preserving:
Thread.sleep(2 * 60 * 1000)AbandonedJobDetector.detectAbandonedJobs()made public; tests trigger the scan directly, latch 3min → 30sgetWikiLikeContentType()inside a 100-iteration loop creates ~100 content types → ~100 ESupdate_mappingcallsThe TagAPITest fix also stops that test permanently bloating the shared index mapping (ES mappings are append-only), which taxes every
update_mappingfrom tests that run after it in MainSuite2b.Only production change is a method visibility change (
private→public) onAbandonedJobDetector.detectAbandonedJobs()— no logic touched; the scheduled executor calls the same method.Investigated and deferred: ShortyIdApiTest.test404CacheWhenDBDown (76s) — not a simple timeout knob (pool is 60 conns / 3s checkout); needs profiling.
Related: #36910 / #36911 (suite reordering).
Checklist
🤖 Generated with Claude Code
This PR fixes: #36912
This PR fixes: #36912