Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ The benchmarks do not measure the performance of target JDBC drivers nor the per
## Usage
1. Build the benchmarks with the following command `../gradlew jmhJar`.
1. the JAR file will be outputted to `build/libs`
2. Run the benchmarks with the following command `java -jar build/libs/benchmarks-1.0.1-jmh.jar`.
2. Run the benchmarks with the following command `java -jar build/libs/benchmarks-1.0.2-jmh.jar`.
1. you may have to update the command based on the exact version of the produced JAR file
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public static String parsePasswordFromUrl(String url) {
// Get the properties from a given url of the generic format:
// "protocol//[hosts][/database][?properties]"
public static void parsePropertiesFromUrl(String url, Properties props) {
String[] urlParameters = url.split("\\?", 1);
String[] urlParameters = url.split("\\?", 2);
if (urlParameters.length == 1) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ public class HikariTests {
@TestTemplate
public void testOpenConnectionWithUrl() throws SQLException {
final HikariDataSource dataSource = new HikariDataSource();
dataSource.setJdbcUrl(ConnectionStringHelper.getWrapperUrl() + "?wrapperPlugins=\"\"");
final String url = ConnectionStringHelper.getWrapperUrl();
dataSource.setJdbcUrl(url + (url.contains("?") ? "&" : "?") + "wrapperPlugins=\"\"");
dataSource.setUsername(TestEnvironment.getCurrent().getInfo().getDatabaseInfo().getUsername());
dataSource.setPassword(TestEnvironment.getCurrent().getInfo().getDatabaseInfo().getPassword());
dataSource.addDataSourceProperty(PropertyDefinition.PLUGINS.name, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void testEncodedParams(final String url, final String expected) {
void testParsingUrlsWithQuestionMarks(final String url, final String expected) {
Properties props = new Properties();
ConnectionUrlParser.parsePropertiesFromUrl(url, props);
assertEquals(props.getProperty("param"), expected);
assertEquals(expected, props.getProperty("param"));
}

private static Stream<Arguments> testGetHostsFromConnectionUrlArguments() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dependencies {
transitive = true
}
testImplementation "joda-time:joda-time:2.3"
testImplementation files('/app/libs/aws-advanced-jdbc-wrapper-1.0.1.jar')
testImplementation files('/app/libs/aws-advanced-jdbc-wrapper-1.0.2.jar')
testImplementation dbLibs.postgresql
testImplementation dbLibs.mysql
testImplementation dbLibs.h2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ dependencies {
// Since both the DB2 driver and HANA have a package "net.jpountz" we have to add dependencies conditionally
// This is due to the "no split-packages" requirement of Java 9+

testRuntimeOnly files('/app/libs/aws-advanced-jdbc-wrapper-1.0.1.jar')
testRuntimeOnly files('/app/libs/aws-advanced-jdbc-wrapper-1.0.2.jar')
testRuntimeOnly dbLibs.mysql

if ( db.startsWith( 'db2' ) ) {
Expand Down