Migrate UniqueTest from Arquillian to AbstractQueryTest#3675
Draft
apmoriarty wants to merge 1 commit into
Draft
Conversation
Drops the Arquillian container deployment and the ShardRange/DocumentRange nested subclasses in favor of extending AbstractQueryTest directly, with the SHARD/DOCUMENT ingest range and each test method's per-case loops converted to @ParameterizedTest + @MethodSource, following the pattern used for QueryFunctionQueryTest/FunctionalSetTest. Ingestion for both ranges happens once in @BeforeAll. This test's assertion shape doesn't fit AbstractQueryTest's default Document/UUID model at all - it needs DocumentTransformer-produced EventBase objects grouped into "unique" sets, matched against sets of acceptable internal IDs. executeQuery() is overridden to build that event list directly (using logic.getConfig().getQuery(), which holds the same settings object passed to initialize()) instead of relying on the base class's Document deserialization, and extraAssertions() replicates the original set-matching logic, using a local copy of expectedGroups per the same destructive-iteration gotcha already found in ExcerptTest/SummaryTest. Also fixes a stale expected-grouping in testUniquenessWithHitTermField: the three WiseGuys UIDs were expected to collapse into a single unique result, but HIT_TERM legitimately differs per event (the matched term text includes the UUID value itself), so they should not collapse the way the sibling BOTH_NULL-based tests do. Confirmed via a temporary debug print showing all three IDs correctly returned as three distinct events before correcting the expectation to three separate singleton groups. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Drops the Arquillian container deployment and the ShardRange/DocumentRange nested subclasses in favor of extending AbstractQueryTest directly, with the SHARD/DOCUMENT ingest range and each test method's per-case loops converted to @ParameterizedTest + @MethodSource, following the pattern used for QueryFunctionQueryTest/FunctionalSetTest. Ingestion for both ranges happens once in @BeforeAll.
This test's assertion shape doesn't fit AbstractQueryTest's default Document/UUID model at all - it needs DocumentTransformer-produced EventBase objects grouped into "unique" sets, matched against sets of acceptable internal IDs. executeQuery() is overridden to build that event list directly (using logic.getConfig().getQuery(), which holds the same settings object passed to initialize()) instead of relying on the base class's Document deserialization, and extraAssertions() replicates the original set-matching logic, using a local copy of expectedGroups per the same destructive-iteration gotcha already found in ExcerptTest/SummaryTest.
Also fixes a stale expected-grouping in testUniquenessWithHitTermField: the three WiseGuys UIDs were expected to collapse into a single unique result, but HIT_TERM legitimately differs per event (the matched term text includes the UUID value itself), so they should not collapse the way the sibling BOTH_NULL-based tests do. Confirmed via a temporary debug print showing all three IDs correctly returned as three distinct events before correcting the expectation to three separate singleton groups.