File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed
main/java/org/firebirdsql/testcontainers
test/java/org/firebirdsql/testcontainers Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ Version History
66
77- Update org.testcontainers: jdbc to 1.14.3
88- Move static config in modules to constructor (see also https://github.com/testcontainers/testcontainers-java/pull/2473 )
9- - Add ContainerState#getHost as a replacement for getContainerIpAddress (see also https://github.com/testcontainers/testcontainers-java/pull/2742 )
9+ - Add ContainerState#getHost as a replacement for getContainerIpAddress (see also https://github.com/testcontainers/testcontainers-java/pull/2742 )
10+ - Added additional url params in JdbcDatabaseContainer (see also https://github.com/testcontainers/testcontainers-java/issues/1802 )
1011
11121.0.3
1213-----
Original file line number Diff line number Diff line change @@ -72,7 +72,9 @@ public String getDriverClassName() {
7272
7373 @ Override
7474 public String getJdbcUrl () {
75- return "jdbc:firebirdsql://" + getHost () + ":" + getMappedPort (FIREBIRD_PORT ) + "/" + getDatabaseName ();
75+ String additionalUrlParams = constructUrlParameters ("?" , "&" );
76+ return "jdbc:firebirdsql://" + getHost () + ":" + getMappedPort (FIREBIRD_PORT )
77+ + "/" + getDatabaseName () + additionalUrlParams ;
7678 }
7779
7880 @ Override
Original file line number Diff line number Diff line change 88
99import static org .firebirdsql .testcontainers .FirebirdContainer .FIREBIRD_PORT ;
1010import static org .firebirdsql .testcontainers .FirebirdContainer .IMAGE ;
11+ import static org .hamcrest .CoreMatchers .allOf ;
12+ import static org .hamcrest .CoreMatchers .containsString ;
13+ import static org .hamcrest .MatcherAssert .assertThat ;
1114import static org .junit .Assert .assertEquals ;
1215import static org .junit .Assert .assertTrue ;
1316import static org .rnorth .visibleassertions .VisibleAssertions .*;
@@ -98,4 +101,20 @@ public void test258_scImage() throws Exception {
98101 }
99102 }
100103 }
104+
105+ @ Test
106+ public void testWithAdditionalUrlParamInJdbcUrl () {
107+ try (FirebirdContainer <?> firebird = new FirebirdContainer <>()
108+ .withUrlParam ("charSet" , "utf-8" )
109+ .withUrlParam ("blobBufferSize" , "2048" )) {
110+
111+ firebird .start ();
112+ String jdbcUrl = firebird .getJdbcUrl ();
113+ assertThat (jdbcUrl , allOf (
114+ containsString ("?" ),
115+ containsString ("&" ),
116+ containsString ("blobBufferSize=2048" ),
117+ containsString ("charSet=utf-8" )));
118+ }
119+ }
101120}
You can’t perform that action at this time.
0 commit comments