@@ -44,14 +44,13 @@ public void appendConnectionUri(StringBuilder uri) {
4444 }
4545
4646 @ BeforeClass
47- public static void setupPostgreSQL (){
48- database = env .getTestHelper ().createTestDatabase (Dialect .POSTGRESQL , Collections .emptyList ());;
47+ public static void setupPostgreSQL () {
48+ database = env .getTestHelper ().createTestDatabase (Dialect .POSTGRESQL , Collections .emptyList ());
49+ ;
4950 }
5051
51-
5252 @ Before
5353 public void createTestTable () {
54-
5554 try (Connection connection = createConnection ()) {
5655 connection .setAutocommit (true );
5756 if (!tableExists (connection , "TEST" )) {
@@ -63,21 +62,20 @@ public void createTestTable() {
6362 connection .runBatch ();
6463 }
6564 }
66-
6765 }
6866
6967 @ Test
7068 public void testExplainStatement () {
7169 try (ITConnection connection = createConnection ()) {
7270 connection .bufferedWrite (
7371 Arrays .asList (
74- Mutation .newInsertBuilder ("TEST" ).set ("ID" ).to (1L ).set ("NAME" ).to ("TEST-1 " ).build (),
75- Mutation .newInsertBuilder ("TEST" ).set ("ID" ).to (2L ).set ("NAME" ).to ("TEST-2 " ).build ()));
72+ Mutation .newInsertBuilder ("TEST" ).set ("ID" ).to (3L ).set ("NAME" ).to ("TEST-3 " ).build (),
73+ Mutation .newInsertBuilder ("TEST" ).set ("ID" ).to (4L ).set ("NAME" ).to ("TEST-4 " ).build ()));
7674 connection .commit ();
7775
7876 ResultSet resultSet =
7977 connection .execute (Statement .of ("EXPLAIN SELECT * from TEST" )).getResultSet ();
80- while (resultSet .next ()){
78+ while (resultSet .next ()) {
8179 assertNotNull (resultSet .getString ("QUERY PLAN" ));
8280 }
8381 assertEquals (1 , resultSet .getColumnCount ());
@@ -95,12 +93,11 @@ public void testExplainAnalyzeStatement() {
9593
9694 ResultSet resultSet =
9795 connection .execute (Statement .of ("EXPLAIN ANALYZE SELECT * from TEST" )).getResultSet ();
98- while (resultSet .next ()){
96+ while (resultSet .next ()) {
9997 assertNotNull (resultSet .getString ("QUERY PLAN" ));
10098 assertNotNull (resultSet .getString ("EXECUTION STATS" ));
10199 }
102100 assertEquals (2 , resultSet .getColumnCount ());
103101 }
104102 }
105-
106103}
0 commit comments