This repository has been archived by the owner on Jan 31, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Disable SSH when using JDBC with MySQL * Fix database names * Make checkstyle happy Co-authored-by: Jozsef Bartok <[email protected]>
- Loading branch information
Showing
13 changed files
with
58 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,6 @@ | |
|
||
import javax.annotation.Nonnull; | ||
import java.sql.Connection; | ||
import java.sql.DriverManager; | ||
import java.sql.Statement; | ||
import java.util.Arrays; | ||
import java.util.Date; | ||
|
@@ -91,8 +90,7 @@ public void customers() throws Exception { | |
assertEqualsEventually(() -> jet.getMap("results").size(), 4); | ||
|
||
//when | ||
try (Connection connection = DriverManager.getConnection(mysql.withDatabaseName("inventory").getJdbcUrl(), | ||
mysql.getUsername(), mysql.getPassword())) { | ||
try (Connection connection = getConnection(mysql, "inventory")) { | ||
Statement statement = connection.createStatement(); | ||
statement.addBatch("UPDATE customers SET first_name='Anne Marie' WHERE id=1004"); | ||
statement.addBatch("INSERT INTO customers VALUES (1005, 'Jason', 'Bourne', '[email protected]')"); | ||
|
@@ -203,8 +201,7 @@ public void restart() throws Exception { | |
JetTestSupport.assertJobStatusEventually(job, JobStatus.RUNNING); | ||
|
||
//then update a record | ||
try (Connection connection = DriverManager.getConnection(mysql.withDatabaseName("inventory").getJdbcUrl(), | ||
mysql.getUsername(), mysql.getPassword())) { | ||
try (Connection connection = getConnection(mysql, "inventory")) { | ||
Statement statement = connection.createStatement(); | ||
statement.addBatch("UPDATE customers SET first_name='Anne Marie' WHERE id=1004"); | ||
statement.addBatch("INSERT INTO customers VALUES (1005, 'Jason', 'Bourne', '[email protected]')"); | ||
|
@@ -251,8 +248,7 @@ public void cdcMapSink() throws Exception { | |
//when | ||
job.restart(); | ||
JetTestSupport.assertJobStatusEventually(job, JobStatus.RUNNING); | ||
try (Connection connection = DriverManager.getConnection(mysql.withDatabaseName("inventory").getJdbcUrl(), | ||
mysql.getUsername(), mysql.getPassword())) { | ||
try (Connection connection = getConnection(mysql, "inventory")) { | ||
Statement statement = connection.createStatement(); | ||
statement.addBatch("UPDATE customers SET first_name='Anne Marie' WHERE id=1004"); | ||
statement.addBatch("INSERT INTO customers VALUES (1005, 'Jason', 'Bourne', '[email protected]')"); | ||
|
@@ -270,8 +266,7 @@ public void cdcMapSink() throws Exception { | |
); | ||
|
||
//when | ||
try (Connection connection = DriverManager.getConnection(mysql.withDatabaseName("inventory").getJdbcUrl(), | ||
mysql.getUsername(), mysql.getPassword())) { | ||
try (Connection connection = getConnection(mysql, "inventory")) { | ||
connection.createStatement().execute("DELETE FROM customers WHERE id=1005"); | ||
} | ||
//then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.