Skip to content

Commit

Permalink
[misc] code style correction
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Aug 29, 2023
1 parent 31b36c1 commit 4434a29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import static org.junit.jupiter.api.Assertions.*;

import java.sql.*;

import org.junit.jupiter.api.*;

public class ConfigurationTest extends Common {
Expand Down Expand Up @@ -59,7 +58,8 @@ public void testSessionVariable() throws SQLException {
assertTrue(rs.next());
} catch (SQLException e) {
// in case server check variable validity
Assertions.assertTrue(e.getCause().getMessage().contains("Unknown system variable 'some';f'"));
Assertions.assertTrue(
e.getCause().getMessage().contains("Unknown system variable 'some';f'"));
}
try (Connection connection =
createCon("sessionVariables=session_track_system_variables=\"some\\\";f,'ff'\"")) {
Expand All @@ -68,10 +68,11 @@ public void testSessionVariable() throws SQLException {
assertTrue(rs.next());
} catch (SQLException e) {
// in case server check variable validity
Assertions.assertTrue(e.getCause().getMessage().contains("Unknown system variable 'some\";f'"));
Assertions.assertTrue(
e.getCause().getMessage().contains("Unknown system variable 'some\";f'"));
}
try (Connection connection =
createCon("sessionVariables=session_track_system_variables=connect_timeout")) {
createCon("sessionVariables=session_track_system_variables=connect_timeout")) {
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT @@session_track_system_variables");
assertTrue(rs.next());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ private void testClosedConn(Connection con) throws SQLException {
@Test
public void masterFailover() throws Exception {
Assumptions.assumeTrue(
!"skysql".equals(System.getenv("srv")) && !"skysql-ha".equals(System.getenv("srv")));
!"maxscale".equals(System.getenv("srv"))
&& !"skysql".equals(System.getenv("srv"))
&& !"skysql-ha".equals(System.getenv("srv")));

Configuration conf = Configuration.parse(mDefUrl);
HostAddress hostAddress = conf.addresses().get(0);
Expand Down

0 comments on commit 4434a29

Please sign in to comment.