|
11 | 11 | import static org.duckdb.DuckDBDriver.DUCKDB_USER_AGENT_PROPERTY; |
12 | 12 | import static org.duckdb.DuckDBDriver.JDBC_STREAM_RESULTS; |
13 | 13 | import static org.duckdb.DuckDBTimestamp.localDateTimeFromTimestamp; |
14 | | -import static org.duckdb.test.Assertions.assertEquals; |
15 | | -import static org.duckdb.test.Assertions.assertFalse; |
16 | | -import static org.duckdb.test.Assertions.assertNotNull; |
17 | | -import static org.duckdb.test.Assertions.assertNull; |
18 | | -import static org.duckdb.test.Assertions.assertThrows; |
19 | | -import static org.duckdb.test.Assertions.assertThrowsMaybe; |
20 | | -import static org.duckdb.test.Assertions.assertTrue; |
21 | | -import static org.duckdb.test.Assertions.fail; |
| 14 | +import static org.duckdb.test.Assertions.*; |
22 | 15 | import static org.duckdb.test.Runner.runTests; |
23 | 16 |
|
24 | 17 | import java.math.BigDecimal; |
@@ -1302,7 +1295,7 @@ public static void test_lots_of_decimals() throws Exception { |
1302 | 1295 | conn.close(); |
1303 | 1296 | } |
1304 | 1297 |
|
1305 | | - public static void test_big_data() throws Exception { |
| 1298 | + public static void test_lots_of_big_data() throws Exception { |
1306 | 1299 | Connection conn = DriverManager.getConnection(JDBC_URL); |
1307 | 1300 | Statement stmt = conn.createStatement(); |
1308 | 1301 | int rows = 10000; |
@@ -4187,21 +4180,6 @@ private static Map<String, Object> structToMap(DuckDBStruct actual) throws SQLEx |
4187 | 4180 | return result; |
4188 | 4181 | } |
4189 | 4182 |
|
4190 | | - private static <T> void assertListsEqual(List<T> actual, List<T> expected) throws Exception { |
4191 | | - assertListsEqual(actual, expected, ""); |
4192 | | - } |
4193 | | - |
4194 | | - private static <T> void assertListsEqual(List<T> actual, List<T> expected, String label) throws Exception { |
4195 | | - assertEquals(actual.size(), expected.size()); |
4196 | | - |
4197 | | - ListIterator<T> itera = actual.listIterator(); |
4198 | | - ListIterator<T> itere = expected.listIterator(); |
4199 | | - |
4200 | | - while (itera.hasNext()) { |
4201 | | - assertEquals(itera.next(), itere.next(), label); |
4202 | | - } |
4203 | | - } |
4204 | | - |
4205 | 4183 | public static void test_cancel() throws Exception { |
4206 | 4184 | ExecutorService service = Executors.newFixedThreadPool(1); |
4207 | 4185 | try (Connection conn = DriverManager.getConnection(JDBC_URL); Statement stmt = conn.createStatement()) { |
@@ -4300,7 +4278,7 @@ public static void test_invalid_execute_calls() throws Exception { |
4300 | 4278 | } |
4301 | 4279 | } |
4302 | 4280 |
|
4303 | | - public static void test_race() throws Exception { |
| 4281 | + public static void test_lots_of_races() throws Exception { |
4304 | 4282 | try (Connection connection = DriverManager.getConnection(JDBC_URL)) { |
4305 | 4283 | ExecutorService executorService = Executors.newFixedThreadPool(10); |
4306 | 4284 |
|
@@ -4799,6 +4777,15 @@ public static void test_typed_connection_properties() throws Exception { |
4799 | 4777 | } |
4800 | 4778 |
|
4801 | 4779 | public static void main(String[] args) throws Exception { |
4802 | | - System.exit(runTests(args, TestDuckDBJDBC.class, TestExtensionTypes.class)); |
| 4780 | + String arg1 = args.length > 0 ? args[0] : ""; |
| 4781 | + final int statusCode; |
| 4782 | + if (arg1.startsWith("Test")) { |
| 4783 | + Class<?> clazz = Class.forName("org.duckdb." + arg1); |
| 4784 | + statusCode = runTests(new String[0], clazz); |
| 4785 | + } else { |
| 4786 | + // extension installation fails on CI, Spatial test is temporary disabled |
| 4787 | + statusCode = runTests(args, TestDuckDBJDBC.class, TestExtensionTypes.class /*, TestSpatial.class */); |
| 4788 | + } |
| 4789 | + System.exit(statusCode); |
4803 | 4790 | } |
4804 | 4791 | } |
0 commit comments