File tree Expand file tree Collapse file tree
main/java/picoded/dstack/connector/jsql
test/java/picoded/dstack/jsql/mysql Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ dependencies {
9292
9393 // api files("./lib/jsql/ojdbc6.jar") // for oracle
9494 api " org.xerial:sqlite-jdbc:3.25.2" // for sqlite
95- api " mysql:mysql-connector-java:6 .0.6 " // for mysql
95+ api " mysql:mysql-connector-java:8 .0.26 " // for mysql
9696
9797 // Newer MSSQL connection (THIS DOES NOT WORK)
9898 // api "com.microsoft.sqlserver:mssql-jdbc:7.2.1.jre8" // for mssql
@@ -266,6 +266,12 @@ test {
266266 // As our test tends to be io-blocked rather then cpu
267267 // we will run more tests in parallels
268268 maxParallelForks = (Runtime . runtime. availableProcessors() * 2 ) as int
269+
270+ // We clamp this to 12 threads, because the high volume of SQL test
271+ // can currently cause connection errors on the test servers
272+ if ( maxParallelForks > 12 ) {
273+ maxParallelForks = 12 ;
274+ }
269275 }
270276
271277 // Set up the number of tests per fork
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ public static HikariDataSource mysql(GenericConvertMap config) {
217217 }
218218
219219 // Setup the configured connection URL + DB
220- hconfig .setDriverClassName ("com.mysql.cj.jdbc.Driver" );
220+ // hconfig.setDriverClassName("com.mysql.cj.jdbc.Driver");
221221
222222 hconfig .setJdbcUrl ("jdbc:mysql://" + host + ":" + port + "/" + name );
223223
@@ -233,7 +233,7 @@ public static HikariDataSource mysql(GenericConvertMap config) {
233233 config .getBoolean ("cachePrepStmts" , true ) //
234234 );
235235 hconfig .addDataSourceProperty ("prepStmtCacheSize" , //
236- config .getInt ("prepStmtCacheSize" , 250 ) //
236+ config .getInt ("prepStmtCacheSize" , 500 ) //
237237 );
238238 hconfig .addDataSourceProperty ("prepStmtCacheSqlLimit" , //
239239 config .getInt ("prepStmtCacheSqlLimit" , 2048 ) //
Original file line number Diff line number Diff line change 1+ package picoded .dstack .jsql .mysql ;
2+
3+ // Test depends
4+ import picoded .dstack .*;
5+ import picoded .dstack .jsql .*;
6+ import picoded .dstack .connector .jsql .*;
7+ import picoded .dstack .struct .simple .*;
8+
9+ public class JSql_DataObjectMap_Mysql_test extends JSql_DataObjectMap_test {
10+
11+ // To override for implementation
12+ //-----------------------------------------------------
13+
14+ /// Note that this SQL connector constructor
15+ /// is to be overriden for the various backend
16+ /// specific test cases
17+ public JSql jsqlConnection () {
18+ return JSqlTestConnection .mysql ();
19+ }
20+
21+ }
You can’t perform that action at this time.
0 commit comments