From cdff9a2d506f20d7c02d0446d0fed461597fbe65 Mon Sep 17 00:00:00 2001 From: Abby Date: Sun, 30 Apr 2023 00:01:14 -0300 Subject: [PATCH 1/3] Update SyntaxRegressionTest.java testJsonTypeCheckFunction is private, by default JUnit5 ignores private methods. So @Test is unnecesary there. References: https://rules.sonarsource.com/java/tag/junit/RSPEC-5810 --- src/test/java/testsuite/regression/SyntaxRegressionTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/java/testsuite/regression/SyntaxRegressionTest.java b/src/test/java/testsuite/regression/SyntaxRegressionTest.java index ac60a705f..384a30b51 100644 --- a/src/test/java/testsuite/regression/SyntaxRegressionTest.java +++ b/src/test/java/testsuite/regression/SyntaxRegressionTest.java @@ -1068,7 +1068,6 @@ public void testJsonType() throws Exception { testJsonTypeCheckFunction("SELECT JSON_VALID('{\"a\": 1}')", "1"); } - @Test private void testJsonTypeCheckFunction(String sql, String expectedResult) throws Exception { this.rs = this.stmt.executeQuery(sql); assertTrue(this.rs.next()); From 12ce3dcde4649dcad60acadd2a95e052baa93a3e Mon Sep 17 00:00:00 2001 From: Abby Date: Sun, 30 Apr 2023 00:12:32 -0300 Subject: [PATCH 2/3] Update SyntaxRegressionTest.java Removed unnecesary @Test By default, JUnit5 ignore those tests References: https://rules.sonarsource.com/java/tag/junit/RSPEC-5810 --- src/test/java/testsuite/regression/SyntaxRegressionTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/test/java/testsuite/regression/SyntaxRegressionTest.java b/src/test/java/testsuite/regression/SyntaxRegressionTest.java index 384a30b51..be3e36e58 100644 --- a/src/test/java/testsuite/regression/SyntaxRegressionTest.java +++ b/src/test/java/testsuite/regression/SyntaxRegressionTest.java @@ -1301,7 +1301,6 @@ public void testCreateTablespace() throws Exception { } } - @Test private void testCreateTablespaceCheckTablespaces(int expectedTsCount) throws Exception { if (versionMeetsMinimum(8, 0, 3)) { this.rs = this.stmt.executeQuery("SELECT COUNT(*) FROM information_schema.innodb_tablespaces WHERE name LIKE 'testTs_'"); @@ -1312,7 +1311,6 @@ private void testCreateTablespaceCheckTablespaces(int expectedTsCount) throws Ex assertEquals(expectedTsCount, this.rs.getInt(1)); } - @Test private void testCreateTablespaceCheckTables(String tablespace, int expectedTblCount) throws Exception { if (versionMeetsMinimum(8, 0, 3)) { this.rs = this.stmt.executeQuery("SELECT COUNT(*) FROM information_schema.innodb_tables a, information_schema.innodb_tablespaces b " @@ -1371,7 +1369,6 @@ public void testSetMergeThreshold() throws Exception { testSetMergeThresholdIndices(tableMergeThreshold, keyMergeThresholds); } - @Test private void testSetMergeThresholdIndices(int defaultMergeThreshold, Map keyMergeThresholds) throws Exception { boolean dbMapsToSchema = ((JdbcConnection) this.conn).getPropertySet().getEnumProperty(PropertyKey.databaseTerm) .getValue() == DatabaseTerm.SCHEMA; From 75d4f724e71bbdd76dba5cb37c593b56f107f92b Mon Sep 17 00:00:00 2001 From: Abby Date: Sun, 30 Apr 2023 00:19:45 -0300 Subject: [PATCH 3/3] Update StatementsTest.java By default, JUnit5 ignore privated method with @Test annotations, so it's unnecesary there. References: https://rules.sonarsource.com/java/tag/junit/RSPEC-5810 --- src/test/java/testsuite/simple/StatementsTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/java/testsuite/simple/StatementsTest.java b/src/test/java/testsuite/simple/StatementsTest.java index a91cd0a1c..8d3941c44 100644 --- a/src/test/java/testsuite/simple/StatementsTest.java +++ b/src/test/java/testsuite/simple/StatementsTest.java @@ -215,7 +215,6 @@ public void testBinaryResultSetNumericTypes() throws Exception { sspsConn.close(); } - @Test private void testBinaryResultSetNumericTypesInternal(Connection con) throws Exception { /* * TINYINT 1 -128 127 SMALLINT 2 -32768 32767 MEDIUMINT 3 -8388608