Skip to content

Commit

Permalink
Update testcontainers to last version to support m1 (#3819)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoothzj authored Mar 1, 2023
1 parent fbd18ae commit a96317e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import org.apache.bookkeeper.versioning.Versioned;
import org.apache.commons.compress.utils.Sets;
import org.junit.Test;
import org.testcontainers.shaded.org.apache.commons.lang.RandomStringUtils;
import org.testcontainers.shaded.org.apache.commons.lang3.RandomStringUtils;

/**
* Integration test {@link KeySetReader}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public EtcdContainer(String clusterName) {
}

public String getExternalServiceUri() {
return "etcd://" + getContainerIpAddress() + ":" + getEtcdClientPort() + "/clusters/" + clusterName;
return "etcd://" + getHost() + ":" + getEtcdClientPort() + "/clusters/" + clusterName;
}

public String getInternalServiceUri() {
Expand Down Expand Up @@ -113,7 +113,7 @@ public int getEtcdClientPort() {
}

public String getClientEndpoint() {
return String.format("http://%s:%d", getContainerIpAddress(), getEtcdClientPort());
return String.format("http://%s:%d", getHost(), getEtcdClientPort());
}

private WaitStrategy waitStrategy() {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
<snakeyaml.version>1.33</snakeyaml.version>
<spotbugs-annotations.version>4.6.0</spotbugs-annotations.version>
<javax-annotations-api.version>1.3.2</javax-annotations-api.version>
<testcontainers.version>1.15.1</testcontainers.version>
<testcontainers.version>1.17.6</testcontainers.version>
<vertx.version>4.3.8</vertx.version>
<zookeeper.version>3.8.1</zookeeper.version>
<snappy.version>1.1.7.7</snappy.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public String getContainerName() {
}

public String getExternalGrpcEndpointStr() {
return getContainerIpAddress() + ":" + getMappedPort(BOOKIE_GRPC_PORT);
return getHost() + ":" + getMappedPort(BOOKIE_GRPC_PORT);
}

public String getInternalGrpcEndpointStr() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public ZKContainer(String clusterName) {

@Override
public String getExternalServiceUri() {
return "zk://" + getContainerIpAddress() + ":" + getMappedPort(ZK_PORT) + "/ledgers";
return "zk://" + getHost() + ":" + getMappedPort(ZK_PORT) + "/ledgers";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ protected void waitUntilReady() {
*/
private URI buildLivenessUri(int livenessCheckPort) {
final String scheme = (tlsEnabled ? "https" : "http") + "://";
final String host = waitStrategyTarget.getContainerIpAddress();
final String host = waitStrategyTarget.getHost();
final String portSuffix;
if ((tlsEnabled && 443 == livenessCheckPort) || (!tlsEnabled && 80 == livenessCheckPort)) {
portSuffix = "";
Expand Down

0 comments on commit a96317e

Please sign in to comment.