@@ -217,11 +217,12 @@ public static TarantoolContainer<?> createTarantoolContainer(Integer... exposedP
217217 // ignore
218218 }
219219
220+ String containerName = String .format ("node-%s" , UUID .randomUUID ());
220221 container =
221222 switch (Character .getNumericValue (TARANTOOL_VERSION .charAt (0 ))) {
222223 case 2 -> Tarantool2Container .builder (dockerImage , initScriptPath ).build ();
223- case 3 -> new Tarantool3Container (dockerImage , "test-node" )
224- .withConfigPath (createConfig (exposedPorts ))
224+ case 3 -> new Tarantool3Container (dockerImage , containerName )
225+ .withConfigPath (createConfig (containerName , exposedPorts ))
225226 .withNetwork (NETWORK )
226227 .waitingFor (
227228 new Tarantool3WaitStrategy ("localhost" , API_USER , CREDS .get (API_USER )))
@@ -231,11 +232,11 @@ public static TarantoolContainer<?> createTarantoolContainer(Integer... exposedP
231232 String .format ("Unsupported Tarantool version, %s" , TARANTOOL_VERSION ));
232233 };
233234
234- return container .withExposedPorts (exposedPorts );
235+ return container .withExposedPorts (3301 ). withExposedPorts ( exposedPorts );
235236 }
236237
237238 @ SneakyThrows
238- private static Path createConfig (Integer ... exposedPorts ) {
239+ private static Path createConfig (String containerName , Integer ... exposedPorts ) {
239240 final Path pathToConfigFile =
240241 Files .createFile (Paths .get (TMP_DIR ).resolve (String .format ("%s.yaml" , UUID .randomUUID ())));
241242
@@ -320,18 +321,18 @@ private static Path createConfig(Integer... exposedPorts) {
320321 final ReplicasetsProperty replicaset =
321322 ReplicasetsProperty .builder ()
322323 .withInstances (
323- Instances .builder ().withAdditionalProperty ("test-node" , instance ).build ())
324+ Instances .builder ().withAdditionalProperty (containerName , instance ).build ())
324325 .build ();
325326
326327 final GroupsProperty group =
327328 GroupsProperty .builder ()
328329 .withReplicasets (
329- Replicasets .builder ().withAdditionalProperty ("test -rs" , replicaset ).build ())
330+ Replicasets .builder ().withAdditionalProperty (containerName + " -rs" , replicaset ).build ())
330331 .build ();
331332
332333 final Tarantool3Configuration configuration =
333334 Tarantool3Configuration .builder ()
334- .withGroups (Groups .builder ().withAdditionalProperty ("test -group" , group ).build ())
335+ .withGroups (Groups .builder ().withAdditionalProperty (containerName + " -group" , group ).build ())
335336 .withCredentials (credentials )
336337 .build ();
337338
0 commit comments