loadConfigurations() throws Exce
/**
* Filters the instances given by {@code vendor}.
- *
- * The match is performed by contains, i.e. oracle matches oracle11 and oracle12.
+ *
+ * The match is performed by the start of vendor name, i.e. h2 matches h2, h2remote, h2v2 and h2v2remote.
*
* @param vendors The list of instances to test.
* @return The filtered instances to test.
@@ -75,16 +76,8 @@ public static Collection loadConfigurations() throws Exce
*/
public static Collection loadConfigurations(final String... vendors) throws Exception {
return loadConfigurations().stream()
- .filter(dbConfig -> {
- for (String vendor : vendors) {
- if (dbConfig.vendor.contains(vendor)) {
- return true;
- }
- }
-
- return false;
- })
- .collect(Collectors.toList());
+ .filter(dbConfig -> Arrays.stream(vendors).anyMatch(dbConfig.vendor::startsWith))
+ .collect(Collectors.toList());
}
/**
diff --git a/src/test/resources/connections.properties b/src/test/resources/connections.properties
index 3d14aaa1..a546383e 100644
--- a/src/test/resources/connections.properties
+++ b/src/test/resources/connections.properties
@@ -6,7 +6,7 @@
###############################################################################################
h2.engine=com.feedzai.commons.sql.abstraction.engine.impl.H2Engine
-h2.jdbc=jdbc:h2:./target/pdb;AUTO_SERVER=FALSE
+h2.jdbc=jdbc:h2:./target/pdb_h2;AUTO_SERVER=FALSE
h2.username=pdb
h2.password=pdb
@@ -16,18 +16,19 @@ h2remote.username=sa
h2remote.password=sa
h2v2.engine=com.feedzai.commons.sql.abstraction.engine.impl.H2EngineV2
-h2v2.jdbc=jdbc:h2:./target/pdb;AUTO_SERVER=FALSE
+h2v2.jdbc=jdbc:h2:./target/pdb_h2v2;AUTO_SERVER=FALSE
h2v2.username=pdb
h2v2.password=pdb
h2v2remote.engine=com.feedzai.commons.sql.abstraction.engine.impl.H2EngineV2
-h2v2remote.jdbc=jdbc:h2:tcp://localhost:9092/public
+h2v2remote.jdbc=jdbc:h2:tcp://localhost:9093/public
h2v2remote.username=sa
h2v2remote.password=sa
mysql.engine=com.feedzai.commons.sql.abstraction.engine.impl.MySqlEngine
-mysql.jdbc=jdbc:mysql://localhost:3306/mysql?useSSL=false
+mysql.jdbc=jdbc:mysql://localhost:3306/mysql?useSSL=false&allowPublicKeyRetrieval=true
# appended "useSSL=false" to jdbc url to avoid a warning about not using SSL;
+# appended "allowPublicKeyRetrieval=true" to jdbc url to avoid "key retrieval not allowed" error in newer MySQL versions
# for mysql, schema and database is the same thing
# default database/schema: none, it must be specified either in jdbc url or in schema property
# example when used in jdbc url: jdbc:mysql://localhost:3306/mysql