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

Update JDBC driver for MemSQL #7179

Merged
merged 1 commit into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugin/trino-memsql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.4.0</version>
<version>2.7.2</version>
</dependency>

<!-- Trino SPI -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.trino.plugin.memsql;

import com.google.common.collect.ImmutableMap;
import io.trino.plugin.jdbc.BaseJdbcConnectorSmokeTest;
import io.trino.testing.QueryRunner;

import static io.trino.plugin.memsql.MemSqlQueryRunner.createMemSqlQueryRunner;

public class TestMemSqlConnectorSmokeTestLatest
extends BaseJdbcConnectorSmokeTest
{
@Override
protected QueryRunner createQueryRunner()
throws Exception
{
TestingMemSqlServer memSqlServer = closeAfterClass(new TestingMemSqlServer(TestingMemSqlServer.LATEST_TESTED_TAG));
return createMemSqlQueryRunner(memSqlServer, ImmutableMap.of(), REQUIRED_TPCH_TABLES);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class TestingMemSqlServer
private static final String MEM_SQL_LICENSE = requireNonNull(System.getProperty("memsql.license"), "memsql.license is not set");

public static final String DEFAULT_TAG = "memsql/cluster-in-a-box:centos-7.1.13-11ddea2a3a-3.0.0-1.9.0";
public static final String LATEST_TESTED_TAG = "memsql/cluster-in-a-box:centos-7.3.4-d596a2867a-3.2.4-1.10.1";
Copy link
Member

Choose a reason for hiding this comment

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

would it make sense to add a test which checks if latest did not get stale?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is current pattern and see #5804 for more info.

We don't automatically support newer MemSQL version when one is released, so a test verifying our Latest is truly latest could start failing any time, and it could be hard to make it fixed, if there were any breaking changes.

We should read "Latest" as "Latest Tested" where "Tested" is omitted for brevity.


public static final Integer MEMSQL_PORT = 3306;

Expand All @@ -42,6 +43,7 @@ public TestingMemSqlServer()
public TestingMemSqlServer(String dockerImageName)
{
super(DockerImageName.parse(dockerImageName));
addEnv("ROOT_PASSWORD", "memsql_root_password");
start();
}

Expand Down Expand Up @@ -75,7 +77,7 @@ public String getUsername()
@Override
public String getPassword()
{
return "";
return "memsql_root_password";
}

@Override
Expand Down