Skip to content

Use tracing for testing DatabaseMetaData ConnectorMetadata invocations #18849

Merged
findepi merged 5 commits intotrinodb:masterfrom
findepi:findepi/test-db-md
Aug 30, 2023
Merged

Use tracing for testing DatabaseMetaData ConnectorMetadata invocations #18849
findepi merged 5 commits intotrinodb:masterfrom
findepi:findepi/test-db-md

Conversation

@findepi
Copy link
Copy Markdown
Member

@findepi findepi commented Aug 29, 2023

Refactor TrinoDatabaseMetaData to leverage tracing like
TestInformationSchemaConnector was changed in
bdc2799.

The differences in expected counts in the test come from the fact how
the counting was done previously. For example
MockConnectorMetadata.listTables calls listSchemaNames before
listTables, so this single metadata call was being recorded as both
listSchemaNames and listTables (zero or more times).

Fixes #18595

@findepi findepi added test no-release-notes This pull request does not require release notes entry labels Aug 29, 2023
@cla-bot cla-bot bot added the cla-signed label Aug 29, 2023
@github-actions github-actions bot added the jdbc Relates to Trino JDBC driver label Aug 29, 2023
Comment thread client/trino-jdbc/src/test/java/io/trino/jdbc/TestTrinoDatabaseMetaData.java Outdated
Refactor `TrinoDatabaseMetaData` to leverage tracing like
`TestInformationSchemaConnector` was changed in
bdc2799.

The differences in expected counts in the test come from the fact how
the counting was done previously. For example
`MockConnectorMetadata.listTables` calls `listSchemaNames` before
`listTables`, so this single metadata call was being recorded as both
`listSchemaNames` and `listTables` (zero or more times).
All usages now use the tracing-based approach
(`TracingConnectorMetadata`).
@findepi findepi force-pushed the findepi/test-db-md branch from e093762 to 136ee7a Compare August 30, 2023 07:06
@github-actions github-actions bot added tests:hive iceberg Iceberg connector delta-lake Delta Lake connector hive Hive connector labels Aug 30, 2023
@findepi findepi merged commit bd92433 into trinodb:master Aug 30, 2023
@findepi findepi deleted the findepi/test-db-md branch August 30, 2023 12:58
@github-actions github-actions bot added this to the 426 milestone Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed delta-lake Delta Lake connector hive Hive connector iceberg Iceberg connector jdbc Relates to Trino JDBC driver no-release-notes This pull request does not require release notes entry test

Development

Successfully merging this pull request may close these issues.

Migrate TestTrinoDatabaseMetaData to CountingMockConnector using tracing

2 participants