drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [drill] martin-g commented on a change in pull request #2217: DRILL-7911 Use TestContainers-MySQL instead of wix-embedded-mysql
Date Fri, 07 May 2021 13:29:45 GMT

martin-g commented on a change in pull request #2217:
URL: https://github.com/apache/drill/pull/2217#discussion_r628205134



##########
File path: contrib/storage-jdbc/src/test/java/org/apache/drill/exec/store/jdbc/TestJdbcPluginWithMySQLIT.java
##########
@@ -51,51 +49,57 @@
 @Category(JdbcStorageTest.class)
 public class TestJdbcPluginWithMySQLIT extends ClusterTest {
 
-  private static EmbeddedMysql mysqld;
+  private static JdbcDatabaseContainer<?> jdbcContainer;
 
   @BeforeClass
   public static void initMysql() throws Exception {
     startCluster(ClusterFixture.builder(dirTestWatcher));
+    String osName = System.getProperty("os.name").toLowerCase();
     String mysqlDBName = "drill_mysql_test";
-    int mysqlPort = QueryTestUtil.getFreePortNumber(2215, 300);
 
-    MysqldConfig config = MysqldConfig.aMysqldConfig(Version.v5_7_27)
-        .withPort(mysqlPort)
-        .withUser("mysqlUser", "mysqlPass")
-        .withTimeZone(DateTimeZone.UTC.toTimeZone())
-        .build();
+    DockerImageName imageName;
+    if (osName.startsWith("linux") && "aarch64".equals(System.getProperty("os.arch")))
{
+      imageName = DockerImageName.parse("mariadb:10.6.0").asCompatibleSubstituteFor("mysql");
+    } else {
+      imageName = DockerImageName.parse("mysql:5.7.27");

Review comment:
       Done!

##########
File path: pom.xml
##########
@@ -1161,6 +1165,16 @@
   <!-- Managed Dependencies -->
   <dependencyManagement>
     <dependencies>
+      <dependency>

Review comment:
       JNA comes as a transitive dependency of:
   - org.kohsuke:libpam4j in drill-java-exec and drill-jdbc-all
   - testcontainers/docker-java-api in all modules which use TestContainers (i.e. MySQL, Mongo,
Splunk, Cassandra and Java Exec
   
   I think defining it in the root pom is the best!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message