Skip to content

Commit 386cf64

Browse files
committed
Fix after review
Closes #55
1 parent e432af4 commit 386cf64

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44

55
## [1.1.1] - 2023-12-13
66

7-
- Fixed default use of `TARANTOOL_CLUSTER_COOKIE`. Now if `TARANTOOL_CLUSTER_COOKIE` is installed via
8-
environment variable or written in the `init.lua` file, then you need to specify value of `TARANTOOL_CLUSTER_COOKIE`
9-
in the `.withRouterPassword()` method. If `TARANTOOL_CLUSTER_COOKIE` is not specified, the default value (`secret-cluster-cookie`)
10-
will be used and no additional actions are required ([#55](https://github.com/tarantool/testcontainers-java-tarantool/issues/55))
7+
- Remove the default value for `TARANTOOL_CLUSTER_COOKIE` env variable in cartridge container.
8+
Now it works like in cartridge in order of decreasing priority as directed by the user:
9+
`TARANTOOL_CLUSTER_COOKIE > cartridge.cfg > default_cookie`
10+
You can set TARANTOOL_CLUSTER_COOKIE by build-arg on image building or by env arg before container starting
11+
([#55](https://github.com/tarantool/testcontainers-java-tarantool/issues/55))
12+
- **[Breaking change]** Default routerPassword has been changed from `testapp-cluster-cookie` to `secret-cluster-cookie`
13+
([#55](https://github.com/tarantool/testcontainers-java-tarantool/issues/55))
1114
- Change private to protected in TarantoolCartridgeContainer
1215
- Add support for the `TARANTOOL_VERSION` environment variable to specify the version in the image name
1316
`tarantool/tarantool:<TARANTOOL_VERSION>-centos7 when calling the constructor without arguments

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public class TarantoolCartridgeContainer extends GenericContainer<TarantoolCartr
107107
public static final String ENV_TARANTOOL_INSTANCES_FILE = "TARANTOOL_INSTANCES_FILE";
108108
public static final String ENV_TARANTOOL_CLUSTER_COOKIE = "TARANTOOL_CLUSTER_COOKIE";
109109
protected static final String healthyCmd = "return require('cartridge').is_healthy()";
110-
protected static final int TWO_MINUTES = 60;
110+
protected static final int TIMEOUT_ROUTER_UP_CARTRIDGE_HEALTH_IN_SECONDS = 60;
111111

112112
protected final CartridgeConfigParser instanceFileParser;
113113
protected final TarantoolContainerClientHelper clientHelper;
@@ -573,10 +573,10 @@ protected void bootstrapVshard() {
573573
protected void containerIsStarted(InspectContainerResponse containerInfo, boolean reused) {
574574
super.containerIsStarted(containerInfo, reused);
575575

576-
waitUntilRouterIsUp(TWO_MINUTES);
576+
waitUntilRouterIsUp(TIMEOUT_ROUTER_UP_CARTRIDGE_HEALTH_IN_SECONDS);
577577
retryingSetupTopology();
578578
// wait until Roles are configured
579-
waitUntilCartridgeIsHealthy(TWO_MINUTES);
579+
waitUntilCartridgeIsHealthy(TIMEOUT_ROUTER_UP_CARTRIDGE_HEALTH_IN_SECONDS);
580580
bootstrapVshard();
581581

582582
logger().info("Tarantool Cartridge cluster is started");

0 commit comments

Comments
 (0)