Skip to content

Commit

Permalink
mysql: Fix code checker warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kohlschuetter committed Apr 19, 2024
1 parent 4011b16 commit f2f043c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class AFUNIXDatabaseSocketFactoryCJTest {
@Test
public void testDriverManagerConnectionToMissingServer() throws Exception {
AFUNIXSocketAddress addr = AFUNIXSocketAddress.ofNewTempFile();
try (Connection conn = DriverManager.getConnection(
try (Connection unused = DriverManager.getConnection(
"jdbc:mysql://localhost/db?socketFactory=org.newsclub.net.mysql.AFUNIXDatabaseSocketFactoryCJ&junixsocket.file="
+ addr.getPath())) {
fail(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class AFUNIXDatabaseSocketFactoryTest {
@Test
public void testDriverManagerConnectionToMissingServer() throws Exception {
AFUNIXSocketAddress addr = AFUNIXSocketAddress.ofNewTempFile();
try (Connection conn = DriverManager.getConnection(
try (Connection unused = DriverManager.getConnection(
"jdbc:mysql://localhost/db?socketFactory=org.newsclub.net.mysql.AFUNIXDatabaseSocketFactory&junixsocket.file="
+ addr.getPath())) {
fail(
Expand All @@ -46,6 +46,7 @@ public void testDriverManagerConnectionToMissingServer() throws Exception {
// expected
}
}

@Test
public void testConnectTimeout() throws Exception {
AFUNIXSocketAddress addr = AFUNIXSocketAddress.ofNewTempFile();
Expand Down

0 comments on commit f2f043c

Please sign in to comment.