Skip to content

Migrate ExecutableExpansionVisitorTest from Arquillian to AbstractQueryTest#3677

Draft
apmoriarty wants to merge 1 commit into
integrationfrom
task/migrate-executable-expansion-visitor-test
Draft

Migrate ExecutableExpansionVisitorTest from Arquillian to AbstractQueryTest#3677
apmoriarty wants to merge 1 commit into
integrationfrom
task/migrate-executable-expansion-visitor-test

Conversation

@apmoriarty

Copy link
Copy Markdown
Collaborator

Drops the Arquillian container deployment and the ShardRangeExecutableExpansion/ DocumentRange nested subclasses in favor of extending AbstractQueryTest directly. This file mixes two very different kinds of tests:

  • ~19 integration-style tests that ingest data and call runTestQuery (renamed here to use givenQuery/expectUUIDs/planAndExecuteQuery), which are parameterized over SHARD/DOCUMENT range via @ParameterizedTest, with a couple using @MethodSource where the original looped over multiple query-string/expected-UUID cases. Ingestion for both ranges happens once in @BeforeAll.
  • ~13 pure unit tests of ExecutableExpansionVisitor/ExecutableDeterminationVisitor against Mockito-mocked ShardQueryConfiguration/MetadataHelper that never touch the ingested data or query logic at all. These are left as plain single @test methods with no range parameter, since the old ShardRange/DocumentRange split needlessly ran them twice for no reason - range was never relevant to them.

Query plan assertion is disabled by default; a handful of tests that originally asserted the final planned query tree via manual TreeEqualityVisitor calls keep doing so directly in the test body after planAndExecuteQuery(), since that maps onto exactly what AbstractQueryTest's own plan assertion already does internally.

…ryTest

Drops the Arquillian container deployment and the ShardRangeExecutableExpansion/
DocumentRange nested subclasses in favor of extending AbstractQueryTest
directly. This file mixes two very different kinds of tests:

- ~19 integration-style tests that ingest data and call runTestQuery
  (renamed here to use givenQuery/expectUUIDs/planAndExecuteQuery), which
  are parameterized over SHARD/DOCUMENT range via @ParameterizedTest, with
  a couple using @MethodSource where the original looped over multiple
  query-string/expected-UUID cases. Ingestion for both ranges happens once
  in @BeforeAll.
- ~13 pure unit tests of ExecutableExpansionVisitor/ExecutableDeterminationVisitor
  against Mockito-mocked ShardQueryConfiguration/MetadataHelper that never
  touch the ingested data or query logic at all. These are left as plain
  single @test methods with no range parameter, since the old
  ShardRange/DocumentRange split needlessly ran them twice for no reason -
  range was never relevant to them.

Query plan assertion is disabled by default; a handful of tests that
originally asserted the final planned query tree via manual
TreeEqualityVisitor calls keep doing so directly in the test body after
planAndExecuteQuery(), since that maps onto exactly what AbstractQueryTest's
own plan assertion already does internally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant