fix: correct off-by-one header/row assertions in ENROLLMENT_OU e2e test (2.43)#24506
Merged
jason-p-pickering merged 1 commit intoJul 20, 2026
Merged
Conversation
queryWithProgramAndFilterByEnrollmentOuKeyword asserted 16 headers/columns, one short of the 17 its sibling queryWithProgramAndFilterByEnrollmentOrgUnit correctly asserts for the equivalent `.ou` query. 2.43's TrackedEntityStaticField includes a storedby field that master's does not, so the 16-header expectation (correct on master, where this test originated) became stale once cherry-picked onto 2.43. Verified the corrected assertions exactly match the sibling test's row data and pass against a live server. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
jbee
approved these changes
Jul 20, 2026
jason-p-pickering
deleted the
fix/te-enrollmentou-header-test-offbyone-2.43
branch
July 20, 2026 09:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
TrackedEntityQueryTest.queryWithProgramAndFilterByEnrollmentOuKeywordasserted 16 headers/row-columns fordimension=<program>.ENROLLMENT_OU:<ou>, one short of the 17 its siblingqueryWithProgramAndFilterByEnrollmentOrgUnitcorrectly asserts for the equivalent.oudimension.TrackedEntityStaticFieldincludes astoredbyfield that master's does not, so the 16-header expectation (correct where this test originated, on master) was stale once cherry-picked onto 2.43 in feat: support ENROLLMENT_OU dimension in TE queries (DHIS2-21072) #24408..ouand.ENROLLMENT_OUspellings, exactly as intended.Discovered while investigating an apparently-unrelated CI failure on #24491 (
perf: pre-filter geoFeatures org units by geometry, backport to 2.43) — that PR doesn't touch any tracked-entity analytics code and was unaffected by this. Confirmed via a trivial no-op test branch (#24505) that this failure is pre-existing on2.43regardless of any other PR content.Full root-cause writeup: see the attached notes below (not yet filed as a Jira ticket).
Root cause detail
Diffing the two tests' expected row-value lists showed they were identical except the
ENROLLMENT_OUvariant was missing one blank""placeholder (for thestoredbycolumn) in each of the three sample rows, and theheaders/width/headerWidthassertions were set to 16 instead of 17 to match. Confirmed on master (via a locally-built image + direct API probe) that both.ouandENROLLMENT_OUcorrectly return 16 headers there (master has nostoredbyfield), so master's version of this test needs no change.Test plan
2.43image from unmodified production code, and ranqueryWithProgramAndFilterByEnrollmentOuKeywordagainst it with the Sierra Leone e2e dataset:Tests run: 1, Failures: 0.queryWithProgramAndFilterByEnrollmentOrgUnit.🤖 Generated with Claude Code