From 0ad0477c64c4d9fc3ff1b544502a1adac562acde Mon Sep 17 00:00:00 2001 From: Alexandr Gorshenin Date: Mon, 12 Feb 2024 15:24:24 +0000 Subject: [PATCH] Updated version of testcontainers --- pom.xml | 2 +- .../tech/ydb/test/integration/DockerHelperFactoryTest.java | 6 +++--- tests/junit4-support/pom.xml | 1 + tests/junit5-support/pom.xml | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 2b52dc70a..3ca38d849 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ 2.17.2 2.8.9 4.11.0 - 1.17.6 + 1.19.3 diff --git a/tests/common/src/test/java/tech/ydb/test/integration/DockerHelperFactoryTest.java b/tests/common/src/test/java/tech/ydb/test/integration/DockerHelperFactoryTest.java index b5e5cb1ef..912c99273 100644 --- a/tests/common/src/test/java/tech/ydb/test/integration/DockerHelperFactoryTest.java +++ b/tests/common/src/test/java/tech/ydb/test/integration/DockerHelperFactoryTest.java @@ -2,13 +2,13 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; -import java.util.function.Consumer; import com.github.dockerjava.api.command.CreateContainerCmd; import org.junit.After; import org.junit.Assert; import org.junit.Test; import org.mockito.Mockito; +import org.testcontainers.core.CreateContainerCmdModifier; import org.testcontainers.utility.ThrowingFunction; import tech.ydb.core.grpc.GrpcTransport; @@ -79,8 +79,8 @@ private void assertCreateContainerCmdModifiers(YdbMockContainer container) { Mockito.when(cmd.withName(Mockito.any())).thenReturn(cmd); Mockito.when(cmd.withHostName(Mockito.any())).thenReturn(cmd); - for (Consumer modifier: container.getCreateContainerCmdModifiers()) { - modifier.accept(cmd); + for (CreateContainerCmdModifier modifier: container.getCreateContainerCmdModifiers()) { + modifier.modify(cmd); } Mockito.verify(cmd, Mockito.times(1)).withName("ydb-" + DockerMock.UUID_MOCKED); // from random UUID diff --git a/tests/junit4-support/pom.xml b/tests/junit4-support/pom.xml index 80b18a93c..b3e6b6c6f 100644 --- a/tests/junit4-support/pom.xml +++ b/tests/junit4-support/pom.xml @@ -27,6 +27,7 @@ junit junit + provided \ No newline at end of file diff --git a/tests/junit5-support/pom.xml b/tests/junit5-support/pom.xml index e1c14cde6..efaa1381e 100644 --- a/tests/junit5-support/pom.xml +++ b/tests/junit5-support/pom.xml @@ -27,6 +27,7 @@ org.junit.jupiter junit-jupiter-api + provided \ No newline at end of file