Skip to content

Avoid redundantly doubled test setup#19421

Merged
findepi merged 1 commit intomasterfrom
findepi/avoid-redundantly-doubled-test-setup-0baa45
Oct 17, 2023
Merged

Avoid redundantly doubled test setup#19421
findepi merged 1 commit intomasterfrom
findepi/avoid-redundantly-doubled-test-setup-0baa45

Conversation

@findepi
Copy link
Copy Markdown
Member

@findepi findepi commented Oct 17, 2023

Disable AbstractTestQueryFramework.ensureTestNamingConvention TestNG test to avoid redundant test setups.

For many test classes, this it the last method that is not converted. For example, running TestInformationSchemaConnector with TestNG will run only this method. Disabling this will make tests like TestInformationSchemaConnector JUnit-only and improve test overall time (fewer createQueryRunner invocations).

The test remains enabled for BaseConnectorTest and BaseConnectorSmokeTest, which already use JUnit and thus are either all-JUnit or do setup twice anyway.

This change also makes it easier to run all-JUnit test classes from an IDE, since now IDE will offer only the "Run with JUnit" option.

Alternative to #19400.

Disable `AbstractTestQueryFramework.ensureTestNamingConvention` TestNG
test to avoid redundant test setups.

For many test classes, this it the last method that is not converted.
For example, running `TestInformationSchemaConnector` with TestNG will
run only this method. Disabling this will make tests like
`TestInformationSchemaConnector` JUnit-only and improve test overall
time (fewer `createQueryRunner` invocations).

The test remains enabled for `BaseConnectorTest` and
`BaseConnectorSmokeTest`, which already use JUnit and thus are either
all-JUnit or do setup twice anyway.

This change also makes it easier to run all-JUnit test classes from an
IDE, since now IDE will offer only the "Run with JUnit" option.
@findepi findepi requested a review from wendigo October 17, 2023 08:57
@cla-bot cla-bot bot added the cla-signed label Oct 17, 2023
}

@Test
// TODO @Test - Temporarily disabled to avoid test classes running twice. Re-enable once all tests migrated to JUnit.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will remember -- when cleaning classpath from testng-related stuff

@findepi
Copy link
Copy Markdown
Member Author

findepi commented Oct 17, 2023

test (plugin/trino-iceberg, cloud-tests) timed out, but it also times out on master.
eg currently penultimate build https://github.com/trinodb/trino/actions/runs/6537894847/job/17752876156

@findepi findepi merged commit ee11b22 into master Oct 17, 2023
@findepi findepi deleted the findepi/avoid-redundantly-doubled-test-setup-0baa45 branch October 17, 2023 11:20
@github-actions github-actions bot added this to the 430 milestone Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants