Skip to content

Commit 481ebe4

Browse files
committed
Use add exposed ports instead of set exposed ports
It's needed when you want to use not only default ports. For example it's usefull when you use metrics for TarantoolContainer.
1 parent d6f21a6 commit 481ebe4

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Fix problem if topology isn't applied correctly
55
- Bump testcontainers to 1.18.0
66
- Move rocks building in build phase
7+
- Use add exposed ports instead of set exposed ports
78

89
## [0.5.4] - 2023-03-31
910
- Use tarantool image as base instead of centos in cartridge container

src/main/java/org/testcontainers/containers/TarantoolCartridgeContainer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import org.testcontainers.containers.exceptions.CartridgeTopologyException;
77
import org.testcontainers.images.builder.ImageFromDockerfile;
8+
import org.testcontainers.shaded.org.apache.commons.lang3.ArrayUtils;
89

910
import java.net.URL;
1011
import java.util.Arrays;
@@ -463,7 +464,7 @@ protected void configure() {
463464
addFixedExposedPort(port, port);
464465
}
465466
} else {
466-
withExposedPorts(instanceFileParser.getExposablePorts());
467+
addExposedPorts(ArrayUtils.toPrimitive(instanceFileParser.getExposablePorts()));
467468
}
468469
}
469470

src/main/java/org/testcontainers/containers/TarantoolContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ protected void configure() {
349349
if (useFixedPorts) {
350350
addFixedExposedPort(port, port);
351351
} else {
352-
withExposedPorts(port);
352+
addExposedPorts(port);
353353
}
354354

355355
withCommand("tarantool", normalizePath(

0 commit comments

Comments
 (0)