Skip to content

Add dedicated JDBC regression tests for hasOverlappingSiblings overlap detection - #5221

Open
harshitaajoshi wants to merge 1 commit into
apache:mainfrom
harshitaajoshi:test/jdbc-overlap-sibling-regression-4600
Open

Add dedicated JDBC regression tests for hasOverlappingSiblings overlap detection#5221
harshitaajoshi wants to merge 1 commit into
apache:mainfrom
harshitaajoshi:test/jdbc-overlap-sibling-regression-4600

Conversation

@harshitaajoshi

Copy link
Copy Markdown
Contributor

What

Adds comprehensive regression test coverage for hasOverlappingSiblings in 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

  • Added 4 new test methods to AtomicMetastoreManagerWithJdbcBasePersistenceImplTest:
    • testHasOverlappingSiblingsTrailingSlashVariants: verifies that a location without a trailing slash still overlaps with a stored location that has one
    • testHasOverlappingSiblingsParentChildBothDirections: verifies overlap is detected when the candidate is a child of an existing entity AND when it is a parent of an existing entity
    • testHasOverlappingSiblingsDuplicateLocations: verifies that an exact duplicate base location is reported as overlapping
    • testHasOverlappingSiblingsAfterEntityDrop: verifies overlap persists while duplicates remain, and disappears only after all overlapping entities are dropped
  • Added a createOverlapTestCatalog helper to reduce boilerplate across new tests
  • Created AtomicMetastoreManagerWithJdbcBasePersistenceImplH2SchemaTest as a concrete H2 parameterized test runner (mirrors the Postgres IT pattern but runs without Docker)

Checklist

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.

JDBC: Add dedicated regression coverage for hasOverlappingSiblings behavior

1 participant