Skip to content

Commit 6bd74c3

Browse files
committed
Add ContainerState#getHost as a replacement for getContainerIpAddress
See also testcontainers/testcontainers-java#2742
1 parent 6be5dec commit 6bd74c3

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ 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-
9+
- Add ContainerState#getHost as a replacement for getContainerIpAddress (see also https://github.com/testcontainers/testcontainers-java/pull/2742)
1010

1111
1.0.3
1212
-----

src/main/java/org/firebirdsql/testcontainers/FirebirdContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public String getDriverClassName() {
7272

7373
@Override
7474
public String getJdbcUrl() {
75-
return "jdbc:firebirdsql://" + getContainerIpAddress() + ":" + getMappedPort(FIREBIRD_PORT) + "/" + getDatabaseName();
75+
return "jdbc:firebirdsql://" + getHost() + ":" + getMappedPort(FIREBIRD_PORT) + "/" + getDatabaseName();
7676
}
7777

7878
@Override

src/test/java/org/firebirdsql/testcontainers/FirebirdContainerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void test258_scImage() throws Exception {
9191
"/firebird/data/test", container.getDatabaseName());
9292

9393
try (Connection connection = DriverManager
94-
.getConnection("jdbc:firebirdsql://" + container.getContainerIpAddress() + ":" + container.getMappedPort(FIREBIRD_PORT) + "/" + container.getDatabaseName(),
94+
.getConnection("jdbc:firebirdsql://" + container.getHost() + ":" + container.getMappedPort(FIREBIRD_PORT) + "/" + container.getDatabaseName(),
9595
container.getUsername(), container.getPassword())
9696
) {
9797
assertTrue(connection.isValid(1000));

0 commit comments

Comments
 (0)