Skip to content

Migrate Thrift connector tests to use BaseConnectorTest.#10233

Merged
hashhar merged 1 commit intotrinodb:masterfrom
HiLany:fix-7117
Dec 28, 2021
Merged

Migrate Thrift connector tests to use BaseConnectorTest.#10233
hashhar merged 1 commit intotrinodb:masterfrom
HiLany:fix-7117

Conversation

@HiLany
Copy link
Copy Markdown
Contributor

@HiLany HiLany commented Dec 8, 2021

Purpose:

Migrate Thrift connector tests to use BaseConnectorTest.

Resolves #7117

Scope:

Test of the Thrift Plugin

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Dec 8, 2021

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla.

@findepi findepi requested a review from findinpath December 8, 2021 10:34
@findepi findepi changed the title [fix-7717]Migrate Thrift connector tests to use BaseConnectorTest. Migrate Thrift connector tests to use BaseConnectorTest. Dec 8, 2021
@findepi
Copy link
Copy Markdown
Member

findepi commented Dec 8, 2021

@HiLany how does this relate to @xuboqing's #7975?

@HiLany
Copy link
Copy Markdown
Contributor Author

HiLany commented Dec 8, 2021

@HiLany how does this relate to @xuboqing's #7975?

I don't know what the current status of this 7975 is, it seems that it hasn't been active for a long time. So I wonder if I can continue to complete this work. If @xuboqing still working this, I will close 10233.

@findepi
Copy link
Copy Markdown
Member

findepi commented Dec 8, 2021

@xuboqing could you please comment?

@HiLany is your work based on the older PR, or independent?

@HiLany
Copy link
Copy Markdown
Contributor Author

HiLany commented Dec 8, 2021

@xuboqing could you please comment?

@HiLany is your work based on the older PR, or independent?

independent.

@yikf
Copy link
Copy Markdown
Contributor

yikf commented Dec 8, 2021

@HiLany Could you describe the PR why we need to migrate, Sorry for i don't understand the older PR.

@findepi FYI, Shall we make a template about PULL-REQUEST-TEMPLATE, like Spark, see: pr_template, So that we can better understand PR.

@findepi
Copy link
Copy Markdown
Member

findepi commented Dec 8, 2021

@findepi FYI, Shall we make a template about PULL-REQUEST-TEMPLATE, like Spark, see: pr_template, So that we can better understand PR.

@yikf thanks for bringing this up. Let's move this topic to slack's #dev.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@HiLany Why did you delete this test?
Was this intentional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

see #7117.

We need to merge TestThriftIntegrationSmokeTest and TestThriftDistributedQueries to form TestThriftConnectorTest.
and BaseConnectorTest is also an implementation class of AbstractTestQueries.

Should we keep TestThriftDistributedQueries?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@HiLany I see. Thanks for pointing this out. You are right. The test is not anymore needed in the context of your PR

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There probably needs to be provided an own implementation of io.trino.testing.BaseConnectorTest#hasBehavior method here due to the fact that this connector does not support all the operations tested in BaseConnectorTest.
Use io.trino.plugin.cassandra.TestCassandraConnectorTest#hasBehavior as a template.

Use io.trino.plugin.thrift.ThriftMetadata and io.trino.spi.connector.ConnectorMetadata to see what is possible in this connector.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There probably needs to be provided an own implementation of io.trino.testing.BaseConnectorTest#hasBehavior method here due to the fact that this connector does not support all the operations tested in BaseConnectorTest.
Use io.trino.plugin.cassandra.TestCassandraConnectorTest#hasBehavior as a template.

Thank you for the reviewed! I will do it。

Use io.trino.plugin.thrift.ThriftMetadata and io.trino.spi.connector.ConnectorMetadata to see what is possible in this connector.

Sorry,I don't understand it。Do you mean to test the functionality of ThriftMetadata?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry,I don't understand it。Do you mean to test the functionality of ThriftMetadata?

By checking the code of the previously mentioned classes, you'll be able to figure out what values of the io.trino.testing.TestingConnectorBehavior you can add to the hasBehavior method .

Note that these values control whether a test needs to be executed or not

        skipTestUnless(hasBehavior(SUPPORTS_CREATE_TABLE));

@findinpath
Copy link
Copy Markdown
Contributor

trino-thrift has several test failures here: https://github.com/trinodb/trino/runs/4456769688?check_suite_focus=true

Please have a look at them to bring the PR in a better shape.

@findinpath
Copy link
Copy Markdown
Contributor

@HiLany please also change your commit message

[fix-7717]Migrate Thrift connector tests to use BaseConnectorTest. towards

Migrate Thrift connector tests to use BaseConnectorTest

Resolves: #7717

Use this guideline as a reference: https://github.com/trinodb/trino/blob/master/.github/DEVELOPMENT.md#format-git-commit-messages

@HiLany
Copy link
Copy Markdown
Contributor Author

HiLany commented Dec 9, 2021

Thanks for pointing this out. i will resolve it.

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Dec 9, 2021

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla.

@HiLany HiLany requested a review from findinpath December 9, 2021 10:47
@HiLany
Copy link
Copy Markdown
Contributor Author

HiLany commented Dec 9, 2021

@HiLany please also change your commit message

[fix-7717]Migrate Thrift connector tests to use BaseConnectorTest. towards

Migrate Thrift connector tests to use BaseConnectorTest

Resolves: #7717

Use this guideline as a reference: https://github.com/trinodb/trino/blob/master/.github/DEVELOPMENT.md#format-git-commit-messages

Hello,@findinpath .Could you review my code again? Thank you!

@findinpath
Copy link
Copy Markdown
Contributor

@HiLany LGTM
Please take care of removing the unnecessary/too verbose comments.

Well done. Thank you for the effort.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that the //dml, //ddl , //query optimizations don't really improve the readability of the code.
Please consider removing them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think so, I will remove it in the next commit.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This comment is too verbose/low level for the context of ThriftQueryRunner.
Please consider removing it.

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Dec 9, 2021

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla.

Copy link
Copy Markdown
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

LGTM % checkstyle failure (see logs of failed CI jobs).

@HiLany
Copy link
Copy Markdown
Contributor Author

HiLany commented Dec 10, 2021

LGTM % checkstyle failure (see logs of failed CI jobs).

Thanks, let me check target/checkstyle-result.xml to see what went wrong.

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Dec 10, 2021

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla.

@HiLany HiLany requested a review from hashhar December 10, 2021 03:08
@HiLany
Copy link
Copy Markdown
Contributor Author

HiLany commented Dec 10, 2021

hello @hashhar ,Could you review my code again? Thank you!

@HiLany HiLany requested a review from findinpath December 10, 2021 04:50
@findinpath
Copy link
Copy Markdown
Contributor

@HiLany
Copy link
Copy Markdown
Contributor Author

HiLany commented Dec 10, 2021

@HiLany were you able to sign the CLA document ? https://github.com/trinodb/trino/blob/master/.github/CONTRIBUTING.md

I have submitted cla to cla@trino.io, but I didn’t get a reply.

@hashhar
Copy link
Copy Markdown
Member

hashhar commented Dec 10, 2021

The CLAs are processed in batches periodically. Please wait a while.
You can see if your CLA has been processed by searching for your GitHub username under https://github.com/trinodb/cla/blob/master/contributors

Copy link
Copy Markdown
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

LGTM % remove link to GitHub issue from commit message.

We prefer that the commit messages stand on their own and don't need someone to refer to external information to make sense of it. In this case the issue doesn't have any useful information.

If you instead want to make sure that the issue is closed once someone merges this PR, edit the Pull Request description to add Fixes #<issue> instead.

cc: @martint for the CLA. This is good to go % CLA.

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Dec 13, 2021

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla.

@HiLany
Copy link
Copy Markdown
Contributor Author

HiLany commented Dec 13, 2021

LGTM % remove link to GitHub issue from commit message.

We prefer that the commit messages stand on their own and don't need someone to refer to external information to make sense of it. In this case the issue doesn't have any useful information.

If you instead want to make sure that the issue is closed once someone merges this PR, edit the Pull Request description to add Fixes #<issue> instead.

cc: @martint for the CLA. This is good to go % CLA.

Thanks for pointing this out! I have modified commit information and submitted it again。

@hashhar
Copy link
Copy Markdown
Member

hashhar commented Dec 15, 2021

@martint Can you help with the CLA, looks good to go otherwise.

@HiLany
Copy link
Copy Markdown
Contributor Author

HiLany commented Dec 24, 2021

@martint Can you help with the CLA, looks good to go otherwise.

I have been added to https://github.com/trinodb/trino/blob/master/.github/CONTRIBUTING.md.

Thanks. @martint @hashhar .

@HiLany
Copy link
Copy Markdown
Contributor Author

HiLany commented Dec 27, 2021

@hashhar Can this pr be merged into master?

@hashhar
Copy link
Copy Markdown
Member

hashhar commented Dec 28, 2021

@cla-bot check

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Dec 28, 2021

The cla-bot has been summoned, and re-checked this pull request!

@cla-bot cla-bot bot added the cla-signed label Dec 28, 2021
@hashhar hashhar merged commit b77916f into trinodb:master Dec 28, 2021
@hashhar
Copy link
Copy Markdown
Member

hashhar commented Dec 28, 2021

Thanks for working on this @HiLany. Merged.

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.

Migrate Thrift connector tests to use BaseConnectorTest

5 participants