Skip to content

Commit 4b8b529

Browse files
wey1andakudiyar
authored andcommitted
Bump the tarantool driver version
1 parent 1560c4d commit 4b8b529

File tree

5 files changed

+29
-30
lines changed

5 files changed

+29
-30
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
</scm>
4747

4848
<properties>
49-
<driver.version>0.4.3</driver.version>
49+
<driver.version>0.6.0</driver.version>
5050
<testcontainers.version>1.15.1</testcontainers.version>
5151
<snakeyaml.version>1.26</snakeyaml.version>
5252
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.testcontainers.containers;
22

3-
import java.io.File;
43
import java.nio.file.Path;
54

65
/**
@@ -22,9 +21,9 @@ private PathUtils() {
2221
*/
2322
public static String normalizePath(String path) {
2423
String result;
25-
if( path.startsWith("/")
24+
if (path.startsWith("/")
2625
&& path.length() > 3
27-
&& path.charAt(2) == ':' ) {
26+
&& path.charAt(2) == ':') {
2827
result = path.substring(1);
2928
} else {
3029
result = path;

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
/**
1717
* Sets up a Tarantool Cartridge cluster and provides API for configuring it.
18-
*
18+
* <p>
1919
* The container constructors accept the classpath resources relative path to the instances.yml file, which contents
2020
* may look like
2121
*
@@ -47,7 +47,7 @@
4747
* http_port: 8085
4848
* </code>
4949
* </pre>
50-
*
50+
* <p>
5151
* and the classpath resources relative path to a topology bootstrap script, which contents may look like
5252
*
5353
* <pre>
@@ -69,9 +69,9 @@
6969
* return cartridge.admin_edit_topology({replicasets = replicasets})
7070
* </code>
7171
* </pre>
72-
*
72+
* <p>
7373
* After the topology changes are applied, the vshard bootstrap command will be executed.
74-
*
74+
* <p>
7575
* The instances.yml file will be analyzed and the ports, specified in advertise_uri options together with the ports,
7676
* specified in the http_port options, will be exposed.
7777
*
@@ -90,14 +90,14 @@ public class TarantoolCartridgeContainer extends GenericContainer<TarantoolCartr
9090
private static final String SCRIPT_RESOURCE_DIRECTORY = "";
9191
private static final String INSTANCE_DIR = "/app";
9292

93-
private static final String ENV_TARANTOOL_VERSION="TARANTOOL_VERSION";
94-
private static final String ENV_TARANTOOL_SERVER_USER="TARANTOOL_SERVER_USER";
95-
private static final String ENV_TARANTOOL_SERVER_UID="TARANTOOL_SERVER_UID";
96-
private static final String ENV_TARANTOOL_SERVER_GROUP="TARANTOOL_SERVER_GROUP";
97-
private static final String ENV_TARANTOOL_SERVER_GID="TARANTOOL_SERVER_GID";
98-
private static final String ENV_TARANTOOL_WORKDIR="TARANTOOL_WORKDIR";
99-
private static final String ENV_TARANTOOL_RUNDIR="TARANTOOL_RUNDIR";
100-
private static final String ENV_TARANTOOL_DATADIR="TARANTOOL_DATADIR";
93+
private static final String ENV_TARANTOOL_VERSION = "TARANTOOL_VERSION";
94+
private static final String ENV_TARANTOOL_SERVER_USER = "TARANTOOL_SERVER_USER";
95+
private static final String ENV_TARANTOOL_SERVER_UID = "TARANTOOL_SERVER_UID";
96+
private static final String ENV_TARANTOOL_SERVER_GROUP = "TARANTOOL_SERVER_GROUP";
97+
private static final String ENV_TARANTOOL_SERVER_GID = "TARANTOOL_SERVER_GID";
98+
private static final String ENV_TARANTOOL_WORKDIR = "TARANTOOL_WORKDIR";
99+
private static final String ENV_TARANTOOL_RUNDIR = "TARANTOOL_RUNDIR";
100+
private static final String ENV_TARANTOOL_DATADIR = "TARANTOOL_DATADIR";
101101

102102
private String routerHost = ROUTER_HOST;
103103
private int routerPort = ROUTER_PORT;
@@ -115,7 +115,7 @@ public class TarantoolCartridgeContainer extends GenericContainer<TarantoolCartr
115115
* Create a container with default image and specified instances file from the classpath resources. Assumes that
116116
* there is a file named Dockerfile in the project resources classpath.
117117
*
118-
* @param instancesFile path to instances.yml, relative to the classpath resources
118+
* @param instancesFile path to instances.yml, relative to the classpath resources
119119
* @param topologyConfigurationFile path to a topology bootstrap script, relative to the classpath resources
120120
*/
121121
public TarantoolCartridgeContainer(String instancesFile, String topologyConfigurationFile) {
@@ -125,8 +125,8 @@ public TarantoolCartridgeContainer(String instancesFile, String topologyConfigur
125125
/**
126126
* Create a container with default image and specified instances file from the classpath resources
127127
*
128-
* @param dockerFile path to a Dockerfile which configures Cartridge and other necessary services
129-
* @param instancesFile path to instances.yml, relative to the classpath resources
128+
* @param dockerFile path to a Dockerfile which configures Cartridge and other necessary services
129+
* @param instancesFile path to instances.yml, relative to the classpath resources
130130
* @param topologyConfigurationFile path to a topology bootstrap script, relative to the classpath resources
131131
*/
132132
public TarantoolCartridgeContainer(String dockerFile, String instancesFile, String topologyConfigurationFile) {
@@ -138,9 +138,9 @@ public TarantoolCartridgeContainer(String dockerFile, String instancesFile, Stri
138138
* the result Cartridge container image name, you can cache the image and avoid rebuilding on each test run (the
139139
* image is tagged with the provided name and not deleted after tests finishing).
140140
*
141-
* @param dockerFile URL resource path to a Dockerfile which configures Cartridge and other necessary services
142-
* @param buildImageName Specify a stable image name for the test container to prevent rebuilds
143-
* @param instancesFile URL resource path to instances.yml relative in the classpath
141+
* @param dockerFile URL resource path to a Dockerfile which configures Cartridge and other necessary services
142+
* @param buildImageName Specify a stable image name for the test container to prevent rebuilds
143+
* @param instancesFile URL resource path to instances.yml relative in the classpath
144144
* @param topologyConfigurationFile URL resource path to a topology bootstrap script in the classpath
145145
*/
146146
public TarantoolCartridgeContainer(String dockerFile, String buildImageName,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package org.testcontainers.containers;
22

3-
import io.tarantool.driver.ClusterTarantoolTupleClient;
4-
import io.tarantool.driver.TarantoolClientConfig;
5-
import io.tarantool.driver.TarantoolServerAddress;
63
import io.tarantool.driver.api.TarantoolClient;
4+
import io.tarantool.driver.api.TarantoolClientConfig;
75
import io.tarantool.driver.api.TarantoolResult;
6+
import io.tarantool.driver.api.TarantoolServerAddress;
87
import io.tarantool.driver.api.tuple.TarantoolTuple;
98
import io.tarantool.driver.auth.SimpleTarantoolCredentials;
109
import io.tarantool.driver.auth.TarantoolCredentials;
10+
import io.tarantool.driver.core.ClusterTarantoolTupleClient;
1111
import org.testcontainers.utility.MountableFile;
1212

1313
import java.nio.file.Paths;
@@ -43,7 +43,7 @@ public final class TarantoolContainerClientHelper {
4343
/**
4444
* Configure or return an already configured client connected to a Cartridge router
4545
*
46-
* @param config router instance client config
46+
* @param config router instance client config
4747
* @param address router host address
4848
* @return a configured client
4949
*/

src/test/java/org/testcontainers/containers/PathUtilsTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ void normalizePathTest() {
2626
Assertions.assertEquals("c:/work/server.lua",
2727
normalizePath("c:\\work\\server.lua"));
2828

29-
Assertions.assertEquals("c:/", normalizePath("c:\\"));
29+
Assertions.assertEquals("c:/", normalizePath("c:\\"));
3030

31-
Assertions.assertEquals("/dummy", normalizePath("/dummy"));
31+
Assertions.assertEquals("/dummy", normalizePath("/dummy"));
3232

33-
Assertions.assertEquals("/c", normalizePath("/c"));
33+
Assertions.assertEquals("/c", normalizePath("/c"));
3434

35-
Assertions.assertThrows(NullPointerException.class, () -> normalizePath((String)null));
35+
Assertions.assertThrows(NullPointerException.class, () -> normalizePath((String) null));
3636
}
3737
}

0 commit comments

Comments
 (0)