diff --git a/CHANGELOG.md b/CHANGELOG.md index e528713d..ac2f8e6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog ## [Unreleased] +### Internal and API changes + +- Bump org.testcontainers:junit-jupiter version to 1.19.3 ([#442](https://github.com/tarantool/cartridge-java/issues/442)) +- Bump testcontainers-java-tarantool version to 1.2.0 ([#442](https://github.com/tarantool/cartridge-java/issues/442)) ### Features diff --git a/pom.xml b/pom.xml index bed54336..3b1aaf20 100644 --- a/pom.xml +++ b/pom.xml @@ -258,13 +258,13 @@ org.testcontainers junit-jupiter - 1.17.4 + 1.19.3 test io.tarantool testcontainers-java-tarantool - 1.0.1 + 1.2.0 test diff --git a/src/test/java/io/tarantool/driver/integration/CartridgeMixedInstancesContainer.java b/src/test/java/io/tarantool/driver/integration/CartridgeMixedInstancesContainer.java index 181baf06..63c60c8d 100644 --- a/src/test/java/io/tarantool/driver/integration/CartridgeMixedInstancesContainer.java +++ b/src/test/java/io/tarantool/driver/integration/CartridgeMixedInstancesContainer.java @@ -23,7 +23,6 @@ abstract class CartridgeMixedInstancesContainer { "cartridge-java-test-mixed", "cartridge/instances_mixed.yml", "cartridge/topology_mixed.lua") - .withDirectoryBinding("cartridge") .withLogConsumer(new Slf4jLogConsumer(logger)) .waitingFor(Wait.forLogMessage(".*Listening HTTP on.*", 3)) .withStartupTimeout(Duration.ofMinutes(2)) diff --git a/src/test/java/io/tarantool/driver/integration/ClusterDiscoveryIT.java b/src/test/java/io/tarantool/driver/integration/ClusterDiscoveryIT.java index 17574eb0..e919989a 100644 --- a/src/test/java/io/tarantool/driver/integration/ClusterDiscoveryIT.java +++ b/src/test/java/io/tarantool/driver/integration/ClusterDiscoveryIT.java @@ -31,8 +31,8 @@ */ public class ClusterDiscoveryIT extends SharedCartridgeContainer { - private static final String TEST_ROUTER1_URI = "localhost:3301"; - private static final String TEST_ROUTER2_URI = "localhost:3302"; + private static final String TEST_ROUTER1_URI = "0.0.0.0:3301"; + private static final String TEST_ROUTER2_URI = "0.0.0.0:3302"; @BeforeAll public static void setUp() { diff --git a/src/test/java/io/tarantool/driver/integration/SharedCartridgeContainer.java b/src/test/java/io/tarantool/driver/integration/SharedCartridgeContainer.java index b221498f..16fc2919 100644 --- a/src/test/java/io/tarantool/driver/integration/SharedCartridgeContainer.java +++ b/src/test/java/io/tarantool/driver/integration/SharedCartridgeContainer.java @@ -21,7 +21,7 @@ public abstract class SharedCartridgeContainer { "cartridge-java-test", "cartridge/instances.yml", "cartridge/topology.lua") - .withDirectoryBinding("cartridge") + .withEnv("TARANTOOL_CLUSTER_COOKIE", "secret-cluster-cookie") .withLogConsumer(new Slf4jLogConsumer(logger)) .waitingFor(Wait.forLogMessage(".*Listening HTTP on.*", 4)) .withStartupTimeout(Duration.ofMinutes(2)); diff --git a/src/test/resources/cartridge/init.lua b/src/test/resources/cartridge/init.lua index 37f6ae5c..89981f4b 100755 --- a/src/test/resources/cartridge/init.lua +++ b/src/test/resources/cartridge/init.lua @@ -15,8 +15,7 @@ local ok, err = cartridge.cfg({ 'app.roles.api_router', 'app.roles.api_storage', 'app.roles.custom', - }, - cluster_cookie = 'testapp-cluster-cookie', + } }, { readahead = 10 * 1024 * 1024, -- 10 MB net_msg_max = 11140, diff --git a/src/test/resources/cartridge/instances.yml b/src/test/resources/cartridge/instances.yml index 2a802a6d..61fc155f 100644 --- a/src/test/resources/cartridge/instances.yml +++ b/src/test/resources/cartridge/instances.yml @@ -1,24 +1,24 @@ testapp.router: workdir: ./tmp/db_dev/3301 - advertise_uri: localhost:3301 + advertise_uri: 0.0.0.0:3301 http_port: 8081 testapp.second-router: workdir: ./tmp/db_dev/3302 - advertise_uri: localhost:3302 + advertise_uri: 0.0.0.0:3302 http_port: 8082 testapp.third-router: workdir: ./tmp/db_dev/3303 - advertise_uri: localhost:3303 + advertise_uri: 0.0.0.0:3303 http_port: 8083 testapp.s1-storage: workdir: ./tmp/db_dev/3304 - advertise_uri: localhost:3304 + advertise_uri: 0.0.0.0:3304 http_port: 8084 testapp.s2-storage: workdir: ./tmp/db_dev/3305 - advertise_uri: localhost:3305 + advertise_uri: 0.0.0.0:3305 http_port: 8085 diff --git a/src/test/resources/cartridge/instances_mixed.yml b/src/test/resources/cartridge/instances_mixed.yml index d707b288..b4608219 100644 --- a/src/test/resources/cartridge/instances_mixed.yml +++ b/src/test/resources/cartridge/instances_mixed.yml @@ -1,14 +1,14 @@ testapp.1: workdir: ./tmp/db_dev/3301 - advertise_uri: localhost:3301 + advertise_uri: 0.0.0.0:3301 http_port: 8081 testapp.2: workdir: ./tmp/db_dev/3302 - advertise_uri: localhost:3302 + advertise_uri: 0.0.0.0:3302 http_port: 8082 testapp.3: workdir: ./tmp/db_dev/3303 - advertise_uri: localhost:3303 + advertise_uri: 0.0.0.0:3303 http_port: 8083 diff --git a/src/test/resources/cartridge/testapp-scm-1.rockspec b/src/test/resources/cartridge/testapp-scm-1.rockspec index d8e90194..3b897e82 100644 --- a/src/test/resources/cartridge/testapp-scm-1.rockspec +++ b/src/test/resources/cartridge/testapp-scm-1.rockspec @@ -7,8 +7,8 @@ source = { dependencies = { 'tarantool', 'lua >= 5.1', - 'cartridge == 2.7.3-1', - 'crud == 0.14.0-1', + 'cartridge == 2.8.3-1', + 'crud == 1.3.0-1', } build = { type = 'none'; diff --git a/src/test/resources/cartridge/topology.lua b/src/test/resources/cartridge/topology.lua index 65d06d23..ba9eaedd 100644 --- a/src/test/resources/cartridge/topology.lua +++ b/src/test/resources/cartridge/topology.lua @@ -2,23 +2,23 @@ cartridge = require('cartridge') replicasets = { { alias = 'app-router', roles = { 'vshard-router', 'app.roles.custom', 'app.roles.api_router' }, - join_servers = { { uri = 'localhost:3301' } } + join_servers = { { uri = '0.0.0.0:3301' } } }, { alias = 'app-router-second', roles = { 'vshard-router', 'app.roles.custom', 'app.roles.api_router' }, - join_servers = { { uri = 'localhost:3302' } } + join_servers = { { uri = '0.0.0.0:3302' } } }, { alias = 'app-router-third', roles = { 'vshard-router', 'app.roles.custom', 'app.roles.api_router' }, - join_servers = { { uri = 'localhost:3303' } } + join_servers = { { uri = '0.0.0.0:3303' } } }, { alias = 's1-storage', roles = { 'vshard-storage', 'app.roles.api_storage' }, - join_servers = { { uri = 'localhost:3304' } } + join_servers = { { uri = '0.0.0.0:3304' } } }, { alias = 's2-storage', roles = { 'vshard-storage', 'app.roles.api_storage' }, - join_servers = { { uri = 'localhost:3305' } } + join_servers = { { uri = '0.0.0.0:3305' } } } } return cartridge.admin_edit_topology({ replicasets = replicasets }) diff --git a/src/test/resources/cartridge/topology_mixed.lua b/src/test/resources/cartridge/topology_mixed.lua index 9e8e0ebc..05dbed10 100644 --- a/src/test/resources/cartridge/topology_mixed.lua +++ b/src/test/resources/cartridge/topology_mixed.lua @@ -3,9 +3,9 @@ replicasets = { { alias = 'mixed-replicasets', roles = { 'vshard-router', 'app.roles.api_router', 'vshard-storage', 'app.roles.api_storage', 'app.roles.custom' }, join_servers = { - { uri = 'localhost:3301' }, - { uri = 'localhost:3302' }, - { uri = 'localhost:3303' }, + { uri = '0.0.0.0:3301' }, + { uri = '0.0.0.0:3302' }, + { uri = '0.0.0.0:3303' }, } } } return cartridge.admin_edit_topology({ replicasets = replicasets })