Skip to content

UNOMI-970: Fix IT ProgressListener ETA using live suite pace#834

Merged
sergehuber merged 3 commits into
apache:masterfrom
sergehuber:feature/UNOMI-970-it-progress-eta-live-pace
Jul 21, 2026
Merged

UNOMI-970: Fix IT ProgressListener ETA using live suite pace#834
sergehuber merged 3 commits into
apache:masterfrom
sergehuber:feature/UNOMI-970-it-progress-eta-live-pace

Conversation

@sergehuber

Copy link
Copy Markdown
Contributor

Summary

  • Re-evaluate IT suite ETA from live wall-clock pace (remaining × elapsed / completed) after every test.
  • Use per-provider historical timings only as hints to reweight remaining work (heavier/lighter than average).
  • Stop shrinking remaining history with a global “faster than cache” MIN_SCALE factor that chronically under-reported ETA after early assumes/skips.
  • Ignore assume-like observed/cached pairs in scale helpers; document the new behavior in itests/README.md.

Fixes: https://issues.apache.org/jira/browse/UNOMI-970
Relates to: UNOMI-912, UNOMI-968

Test plan

  • mvn -Pintegration-tests -pl itests -Dtest=TestTimingCacheTest surefire:test -Drat.skip=true -Ddocker.skip=true
  • Optional: run a full AllITs suite and confirm ETA tracks wall-clock pace (does not freeze around ~4m early)

sergehuber and others added 3 commits July 21, 2026 13:39
Re-evaluate remaining time from elapsed/completed after every test and
treat historical timings as hints so early skips no longer collapse ETA.
Address review findings on the live-pace ETA calculation:
- Derive live pace from the average of substantive completed test
  durations instead of elapsed/completedCount, which chronically
  inflated the ETA after any failed test (wall time counted, but
  the failure was excluded from the denominator) and could still
  collapse the ETA when many fast assume/skip completions preceded
  a block of heavy tests.
- Make computeScale's skew guard one-directional so a genuine
  per-test regression (historically fast, now much slower) is no
  longer silently excluded from raising the ETA.
- Replace the untyped (observed, cached) long[] pairs with a
  TimingSample record to remove ordering ambiguity.
- Fix fallbackAverageMs's averaging to be consistent with the new
  averagePositive/averageAtLeast helper.
- Stop TestTimingCache.save() from blending near-instant
  assume/skip durations into a test's historical average, which
  would otherwise gradually erode the hint used by estimateRemainingMs.

Adds regression tests for each fix (including a mutation-tested
check that the old elapsed/completedCount bug is actually caught)
plus edge-case coverage for null/empty inputs.
- Fix ProgressListener to override testAssumptionFailure so JUnit
  Assume-based skips (e.g. RolloverIT's backend-capability gating) are
  excluded from the timing cache/live pace the same way hard failures
  already were — previously they silently flowed through testFinished
  as full successes, contradicting the documented behavior.
- Make estimateRemainingMs's historical-hint reweighting genuinely
  bidirectional: remove the Math.max(rateEtaMs, hintShapedEtaMs) floor
  that made hints raise-only, so historically lighter remaining work
  can now lower the ETA below flat live pace, not just raise it.
- Consolidate ProgressListener's two always-together-mutated lists
  (completedDurations, observedVsCached) into a single CompletedSample
  per completed test, removing an untyped-parallel-collection hazard
  without changing TestTimingCache's tested public API.
- Cap the true-cold-start ETA placeholder (COLD_START_PLACEHOLDER_CAP_MS)
  so a stalled start with no successes/no cache can't balloon the
  displayed ETA unboundedly with elapsed time.
- Harden TestTimingCache.save()/load(): distinguish expected I/O
  failures from unexpected RuntimeExceptions (the latter now logged at
  WARN with a full stack trace instead of silently swallowed), clean up
  orphaned temp files on a failed write, and log malformed cache
  entries instead of dropping them silently.
- Fix stale/misleading Javadoc (MAX_PAIR_SKEW's own example was already
  excluded by a different gate; the elapsed/cold-start parameter docs
  didn't match the actual guard).
- Add ProgressListenerTest exercising the real JUnit RunListener wiring
  (testFailure/testAssumptionFailure/testFinished/testIgnored), plus
  new TestTimingCacheTest coverage for the bidirectional hint fix, the
  slowdown-boost ramp at scale, and the capped cold-start placeholder.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@sergehuber
sergehuber merged commit 38a32b4 into apache:master Jul 21, 2026
7 of 9 checks passed
@sergehuber
sergehuber deleted the feature/UNOMI-970-it-progress-eta-live-pace branch July 22, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant