-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Merge DistributedQueries and Smoke test class in MySQL connector #7011
Conversation
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlConnectorTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlConnectorTest.java
Outdated
Show resolved
Hide resolved
...trino-mysql/src/test/java/io/trino/plugin/mysql/TestGlobalTransactionMySqlConnectorTest.java
Show resolved
Hide resolved
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlConnectorTest.java
Outdated
Show resolved
Hide resolved
...trino-mysql/src/test/java/io/trino/plugin/mysql/TestGlobalTransactionMySqlConnectorTest.java
Show resolved
Hide resolved
57e6bb9
to
0d8d92a
Compare
ac |
Needed to fix |
MaterializedResult result = computeActual("SHOW TABLES"); | ||
assertThat(result.getOnlyColumnAsSet()).containsAll(expectedTables); | ||
assertThat(result.getOnlyColumnAsSet()).containsAll(createdTpchTables()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't expose this. Simpliy enumerat those tables, which are required by other test methods. this is sufficient from this test perspective
{ | ||
protected static final List<TpchTable<?>> TPCH_TABLES = ImmutableList.of(CUSTOMER, NATION, ORDERS, REGION, LINE_ITEM); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be defined on BaseConnectorTest level and named like REQUIRED_TPCH_TABLES
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I defined it in AbstractTestQueries.java
. Can be moved to BaseConnectorTest
when we will be removing ATQ
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlConnectorTest.java
Outdated
Show resolved
Hide resolved
6189a98
to
601e35c
Compare
@findepi PTAL |
plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/RaptorQueryRunner.java
Outdated
Show resolved
Hide resolved
if (createTpchTables) { | ||
tables = TpchTable.getTables(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here -- one should pass in empty list of tables instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if many places to update -- just add a TODO note in the code
@@ -49,6 +50,12 @@ private PhoenixQueryRunner() | |||
|
|||
public static DistributedQueryRunner createPhoenixQueryRunner(TestingPhoenixServer server, Map<String, String> extraProperties) | |||
throws Exception | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this overload? how many places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueries.java
Outdated
Show resolved
Hide resolved
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlConnectorTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/BaseMySqlConnectorTest.java
Outdated
Show resolved
Hide resolved
e92d2d9
to
573e9ab
Compare
public static DistributedQueryRunner createRaptorQueryRunner( | ||
Map<String, String> extraProperties, | ||
boolean loadTpch, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
} | ||
|
||
public static DistributedQueryRunner createIcebergQueryRunner(Map<String, String> extraProperties, FileFormat format, boolean createTpchTables) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
573e9ab
to
4caa1cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skimmed. ACK.
// TODO extend BaseConnectorTest | ||
extends AbstractTestIntegrationSmokeTest | ||
abstract class BaseMySqlConnectorTest | ||
// TODO(https://github.com/trinodb/trino/issues/7019) define shorter tests set that exercises various read and write scenarios (a.k.a. "a smoke test") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO is in the wrong place. You need one full test suite and one smoke test for TestGlobalTransactionMySqlConnectorTest
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh - I guess I read the intention wrongly, and assumed we want both smoke and full tests, so we can run this or this depending on the situation.
TestMySqlDistributedQueries is merged in into BaseMySqlIntegrationSmokeTest which is renamed to BaseMySqlConnectorTest. The subclasses are renamed to match new naming pattern.
4caa1cb
to
c81138f
Compare
TestMySqlDistributedQueries is merged in into
BaseMySqlIntegrationSmokeTest which is renamed to BaseMySqlConnectorTest.
The subclasses are renamed to match new naming pattern.