Skip to content

Commit 3b8f581

Browse files
authored
chore: update version for hibernate tests (#384)
1 parent 73e9ebc commit 3b8f581

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

benchmarks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ The benchmarks do not measure the performance of target JDBC drivers nor the per
77
## Usage
88
1. Build the benchmarks with the following command `../gradlew jmhJar`.
99
1. the JAR file will be outputted to `build/libs`
10-
2. Run the benchmarks with the following command `java -jar build/libs/benchmarks-1.0.1-jmh.jar`.
10+
2. Run the benchmarks with the following command `java -jar build/libs/benchmarks-1.0.2-jmh.jar`.
1111
1. you may have to update the command based on the exact version of the produced JAR file

wrapper/src/main/java/software/amazon/jdbc/util/ConnectionUrlParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public static String parsePasswordFromUrl(String url) {
142142
// Get the properties from a given url of the generic format:
143143
// "protocol//[hosts][/database][?properties]"
144144
public static void parsePropertiesFromUrl(String url, Properties props) {
145-
String[] urlParameters = url.split("\\?", 1);
145+
String[] urlParameters = url.split("\\?", 2);
146146
if (urlParameters.length == 1) {
147147
return;
148148
}

wrapper/src/test/java/integration/refactored/container/tests/HikariTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ public class HikariTests {
7575
@TestTemplate
7676
public void testOpenConnectionWithUrl() throws SQLException {
7777
final HikariDataSource dataSource = new HikariDataSource();
78-
dataSource.setJdbcUrl(ConnectionStringHelper.getWrapperUrl() + "?wrapperPlugins=\"\"");
78+
final String url = ConnectionStringHelper.getWrapperUrl();
79+
dataSource.setJdbcUrl(url + (url.contains("?") ? "&" : "?") + "wrapperPlugins=\"\"");
7980
dataSource.setUsername(TestEnvironment.getCurrent().getInfo().getDatabaseInfo().getUsername());
8081
dataSource.setPassword(TestEnvironment.getCurrent().getInfo().getDatabaseInfo().getPassword());
8182
dataSource.addDataSourceProperty(PropertyDefinition.PLUGINS.name, "");

wrapper/src/test/java/software/amazon/jdbc/util/ConnectionUrlParserTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void testEncodedParams(final String url, final String expected) {
8686
void testParsingUrlsWithQuestionMarks(final String url, final String expected) {
8787
Properties props = new Properties();
8888
ConnectionUrlParser.parsePropertiesFromUrl(url, props);
89-
assertEquals(props.getProperty("param"), expected);
89+
assertEquals(expected, props.getProperty("param"));
9090
}
9191

9292
private static Stream<Arguments> testGetHostsFromConnectionUrlArguments() {

wrapper/src/test/resources/hibernate_files/hibernate-core.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ dependencies {
6161
transitive = true
6262
}
6363
testImplementation "joda-time:joda-time:2.3"
64-
testImplementation files('/app/libs/aws-advanced-jdbc-wrapper-1.0.1.jar')
64+
testImplementation files('/app/libs/aws-advanced-jdbc-wrapper-1.0.2.jar')
6565
testImplementation dbLibs.postgresql
6666
testImplementation dbLibs.mysql
6767
testImplementation dbLibs.h2

wrapper/src/test/resources/hibernate_files/java-module.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ dependencies {
9797
// Since both the DB2 driver and HANA have a package "net.jpountz" we have to add dependencies conditionally
9898
// This is due to the "no split-packages" requirement of Java 9+
9999

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

103103
if ( db.startsWith( 'db2' ) ) {

0 commit comments

Comments
 (0)