Skip to content

Commit

Permalink
Merge pull request #12 from rovio/_fix_unittest_connection_string
Browse files Browse the repository at this point in the history
set UseSSL=false for false for unittest Mysql connection string
  • Loading branch information
juhoautio-rovio authored May 7, 2021
2 parents b82631a + ab0b71c commit dd38a69
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/java/com/rovio/ingest/DruidSourceBaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ public static void beforeClass() throws Exception {

public static void prepareDatabase() throws IOException, SQLException {
connectionString = MYSQL.getJdbcUrl();
if (!connectionString.contains("useSSL=")) {
String separator = connectionString.contains("?") ? "&" : "?";
connectionString = connectionString + separator + "useSSL=false";
}
// Druid requires its MySQL database to be created with an UTF8 charset.
runSql(String.format("ALTER DATABASE %s CHARACTER SET utf8mb4", DB_NAME));
runSql(String.format("CREATE TABLE %1$s (\n"
Expand Down

0 comments on commit dd38a69

Please sign in to comment.