MINOR - test case summary list optimization#26004
MINOR - test case summary list optimization#26004TeddyCr merged 4 commits intoopen-metadata:mainfrom
Conversation
…ary-List-Optimization
🔍 CI failure analysis for 9c70023: CI failures persist for commit 9c70023: maven-sonarcloud-ci retried but failed again with the SAME 6 DataProductResourceTest failures (not flaky, consistently failing), plus persistent Elasticsearch infrastructure issues in integration tests.IssueMultiple CI jobs failed for commit Root Cause1. Persistent DataProduct test bugs: Two retry attempts both failed with identical 6 test failures (not flaky) 2. Systemic Elasticsearch infrastructure issues: Three retry attempts all failed with different tests 3. Other issues: External workflow failure, Playwright flakiness Detailsmaven-sonarcloud-ci - Second attempt, same failures (NOT flaky)1st attempt (job 64225079804): 6 DataProductResourceTest failures Unit tests: 7966 tests run, 701 skipped, 6 failed All 6 failures in
Analysis: The retry failed with exactly the same 6 tests in both attempts. This is NOT a flaky test scenario - these are persistent test bugs or pre-existing issues in
Test Report (job 64253341551)Cascading failure from maven-sonarcloud-ci. integration-tests-mysql-elasticsearch - Three retries, three different failures1st: Chart/Glossary timeouts Systemic Elasticsearch infrastructure issues. Other persistent failures
PR relevance: This PR (commit
All failures are unrelated to the PR changes. The DataProduct tests are not flaky - they fail consistently, indicating pre-existing bugs in Code Review ✅ ApprovedClean, well-scoped performance optimization that replaces expensive batch entity resolution with in-memory status aggregation. No bugs, security issues, or correctness concerns found. Tip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
| setFieldFromMap(true, testSuites, testSummaryMap, TestSuite::setSummary); | ||
| } | ||
|
|
||
| private TestSummary computeSimpleSummary(List<ResultSummary> results) { |
There was a problem hiding this comment.
Map<Status, Integer> counts = new EnumMap<>(Status.class);
for (ResultSummary r : results) {
Status status = r.getStatus();
counts.merge(status, 1, Integer::sum);
}
|
* fix(testCase-Summary): summary field optimization * fix(testCase-Summary): remove collectors (cherry picked from commit e387503)
* fix(testCase-Summary): summary field optimization * fix(testCase-Summary): remove collectors (cherry picked from commit e387503)



Describe your changes:
batchResolveEntityLinksfrom the batch/search/listpath — it loaded all TestCase entities from DB just to resolveentityLinkfor column-level breakdowns the frontend list view never usescomputeSimpleSummarythat computes status counts (total/success/failed/aborted/queued) directly fromResultSummaryobjects in memorytestCaseResultSummaryin the batch path and add it toclearFieldsto prevent data leakage into responsesPerformance Benchmark
Test setup: 10 test suites x 20 test cases x 50 results = 10,000 total test case results
Before vs After
Detailed After-Fix Numbers
Server-Side Metrics
Root Cause
fetchAndSetTestCaseResultSummarycalledbatchResolveEntityLinkswhich invokedEntity.getEntityByNames(TEST_CASE, ...)to load ~200 full TestCase JSON blobs from the database — just to extract theentityLinkfield for column-level summary breakdowns. The frontend list view (TestSuites.component.tsx) only usessummary.totalandsummary.success, nevertestCaseResultSummaryor column breakdowns.Changes
TestSuiteRepository.javafetchAndSetTestCaseResultSummary— RemovedbatchResolveEntityLinkscall andtestCaseResultSummarypopulation. Now computes summary directly from status values via newcomputeSimpleSummarymethod.clearFields— AddedtestCaseResultSummaryclearing to prevent leaking per-test-case detail into list responses.batchResolveEntityLinks— Dead code after the above change.TestSuiteResourceTest.javatest_testSuiteReindexConsistencyto assert onsummary(total/success counts) instead oftestCaseResultSummary, matching the new batch path behavior.Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Improvement