3333import static org .msgpack .value .ValueFactory .newInteger ;
3434import static org .msgpack .value .ValueFactory .newMap ;
3535import static org .testcontainers .containers .utils .TarantoolContainerClientHelper .createTarantoolContainer ;
36+ import static org .testcontainers .containers .utils .TarantoolContainerClientHelper .execInitScript ;
3637import static org .testcontainers .containers .utils .TarantoolContainerClientHelper .executeCommandDecoded ;
3738import io .netty .channel .ConnectTimeoutException ;
3839import org .junit .jupiter .api .AfterAll ;
3940import org .junit .jupiter .api .BeforeAll ;
4041import org .junit .jupiter .api .RepeatedTest ;
4142import org .junit .jupiter .api .Test ;
4243import org .junit .jupiter .api .Timeout ;
44+ import org .junit .jupiter .api .condition .DisabledIfEnvironmentVariable ;
4345import org .msgpack .value .Value ;
4446import org .msgpack .value .ValueFactory ;
4547import org .slf4j .Logger ;
@@ -103,9 +105,10 @@ public void accept(IProtoResponse msg) {
103105
104106 @ BeforeAll
105107 public static void setUp () throws Exception {
106- tt = createTarantoolContainer (). withEnv ( ENV_MAP ). withExposedPorts ( 3302 , 3303 , 3304 , 3306 );
108+ tt = createTarantoolContainer (3302 , 3303 , 3304 , 3306 ). withEnv ( ENV_MAP );
107109
108110 tt .start ();
111+ execInitScript (tt );
109112
110113 List <?> result = executeCommandDecoded (tt , "return box.info.version" );
111114 String fullVersion = (String ) result .get (0 );
@@ -190,6 +193,7 @@ public void testConnectToAddressWithBadHost() {
190193 * SocketException with "Connection reset" message
191194 * */
192195 @ Test
196+ @ DisabledIfEnvironmentVariable (named = "TARANTOOL_VERSION" , matches = "3.*" )
193197 public void testConnectToNonAcceptingService () {
194198 Integer otherPort = tt .getMappedPort (3302 );
195199 Connection client = factory .create ();
@@ -222,6 +226,7 @@ public void testConnectToNonAcceptingService() {
222226 }
223227
224228 @ Test
229+ @ DisabledIfEnvironmentVariable (named = "TARANTOOL_VERSION" , matches = "3.*" )
225230 public void testConnectToServiceWithBadGreeting () {
226231 Integer otherPort = tt .getMappedPort (3304 );
227232 Connection client = factory .create ();
@@ -239,6 +244,7 @@ public void testConnectToServiceWithBadGreeting() {
239244 * ConnectionException with "Connection timeout" message
240245 * */
241246 @ Test
247+ @ DisabledIfEnvironmentVariable (named = "TARANTOOL_VERSION" , matches = "3.*" )
242248 public void testConnectToSilentNode () {
243249 Integer otherPort = tt .getMappedPort (3303 );
244250 Connection client = factory .create ().listen (msg -> {});
@@ -256,6 +262,7 @@ public void testConnectToSilentNode() {
256262 * ConnectionException with "Connection timeout" message
257263 * */
258264 @ Test
265+ @ DisabledIfEnvironmentVariable (named = "TARANTOOL_VERSION" , matches = "3.*" )
259266 public void testConnectToSilentNodeAndClose () throws Exception {
260267 Integer otherPort = tt .getMappedPort (3303 );
261268 Connection client = factory .create ().listen (msg -> {});
@@ -322,6 +329,7 @@ public void testConnectByMultipleThreads() throws InterruptedException {
322329 }
323330
324331 @ Test
332+ @ DisabledIfEnvironmentVariable (named = "TARANTOOL_VERSION" , matches = "3.*" )
325333 public void testConnectWithGreetingTimeout () throws InterruptedException {
326334 Connection client = factory .create ();
327335 InetSocketAddress address = new InetSocketAddress (tt .getHost (), tt .getMappedPort (3306 ));
@@ -335,6 +343,7 @@ public void testConnectWithGreetingTimeout() throws InterruptedException {
335343 }
336344
337345 @ Test
346+ @ DisabledIfEnvironmentVariable (named = "TARANTOOL_VERSION" , matches = "3.*" )
338347 public void testConnectWithWaitingForGreetingAndClose () throws Exception {
339348 Connection client = factory .create ();
340349 InetSocketAddress address = new InetSocketAddress (tt .getHost (), tt .getMappedPort (3306 ));
0 commit comments