Add dedicated JDBC regression tests for hasOverlappingSiblings overlap detection - #5221
Open
harshitaajoshi wants to merge 1 commit into
Open
Conversation
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.
What
Adds comprehensive regression test coverage for
hasOverlappingSiblingsin the JDBC persistence layer, as requested in #4600. Also adds a concrete H2-based parameterized test runner so these tests can run locally without Docker.Why
The existing JDBC test only covered a basic parent/child overlap and a non-overlapping case. The NoSQL layer had much broader coverage for edge cases (trailing slashes, both overlap directions, duplicates, entity drops) but the JDBC layer did not. These regression tests ensure the JDBC overlap detection behaves correctly across all important scenarios and prevents future regressions.
Fixes #4600
Changes
AtomicMetastoreManagerWithJdbcBasePersistenceImplTest:testHasOverlappingSiblingsTrailingSlashVariants: verifies that a location without a trailing slash still overlaps with a stored location that has onetestHasOverlappingSiblingsParentChildBothDirections: verifies overlap is detected when the candidate is a child of an existing entity AND when it is a parent of an existing entitytestHasOverlappingSiblingsDuplicateLocations: verifies that an exact duplicate base location is reported as overlappingtestHasOverlappingSiblingsAfterEntityDrop: verifies overlap persists while duplicates remain, and disappears only after all overlapping entities are droppedcreateOverlapTestCataloghelper to reduce boilerplate across new testsAtomicMetastoreManagerWithJdbcBasePersistenceImplH2SchemaTestas a concrete H2 parameterized test runner (mirrors the Postgres IT pattern but runs without Docker)Checklist
CHANGELOG.md(if needed)site/content/in-dev/unreleased(if needed)