Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kudu unit test class against latest 1.14.0 #7127

Closed
wants to merge 4 commits into from

Conversation

adamjshook
Copy link
Member

This commit refactors the distributed tests into a base with two implementations, the existing unit tests against the 1.10.0 of Kudu and the latest 1.14.0 version.

Relates to #5804

import static io.trino.spi.type.VarcharType.VARCHAR;
import static io.trino.testing.MaterializedResult.resultBuilder;
import static io.trino.testing.assertions.Assert.assertEquals;

public class TestKuduDistributedQueries
public abstract class BaseKuduDistributedQueries
Copy link
Member

Choose a reason for hiding this comment

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

Can we instead use base BaseKuduDistributedQueries no BaseConnectorTest?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added an additional commit to extend BaseConnectorTest.

@adamjshook adamjshook force-pushed the kudu-latest branch 2 times, most recently from d8f4744 to f2eca9d Compare March 3, 2021 19:44
public abstract class BaseKuduDistributedQueries
extends AbstractTestDistributedQueries
public abstract class BaseKuduConnectorTest
extends BaseConnectorTest
Copy link
Member

Choose a reason for hiding this comment

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

If you are using BaseConnectorTest then you should also remove AbstractKuduIntegrationSmokeTest as smoke tests are already in BaseConnectorTest.

Copy link
Member Author

Choose a reason for hiding this comment

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

@kokosing Took a look at removing this. I am a bit hesitant because each of the integration smoke tests implementations have a separate schema inference -- disabled, empty, or standard -- which is given to as an input parameter to a QueryRunner. This seems intentional to me, but I am not familiar with the Kudu connector tests. Just trying to add support for testing the latest. Let me know your thoughts.

I've rebased this PR to the latest master.

Copy link
Member

Choose a reason for hiding this comment

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

each of the integration smoke tests implementations have a separate schema inference -- disabled, empty, or standard
So you can have a dedicated instance of BaseKuduConnectorTest for each case. Or you can create a BaseKuduConnectorSmokeTest (that extends BaseConnectorSmokeTest) and use it for each case.

import static io.trino.plugin.kudu.KuduQueryRunnerFactory.createKuduQueryRunnerTpch;

public class TestKuduLatestConnectorTest
extends BaseKuduConnectorTest
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a ConnectorSmokeTest only?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've been a bit out of the loop on the changes from Distributed/Smoke tests to these BaseConnectorTest and BaseConnectorSmokeTest. I'm okay keeping the "latest" tests as a smoke test if that has been the pattern that has been adopted for testing the later versions of the software. Makes sense since the expectation is that newer versions should work and we don't need to go through the full breadth of testing and a quick smoke test is sufficient.

Copy link
Member

Choose a reason for hiding this comment

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

that's my thinking as well

@ebyhr
Copy link
Member

ebyhr commented Mar 2, 2022

Let me close this PR because #10940 fixed the tests.

@ebyhr ebyhr closed this Mar 2, 2022
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.

4 participants