diff --git a/CHANGELOG.md b/CHANGELOG.md index 367d0e2..52629bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. +## [[1.0.2]](https://github.com/iExecBlockchainComputing/iexec-commons-containers/releases/tag/v1.0.2) 2023-04-13 + +### Bug Fixes +- Remove unused `@Tag` annotations in tests. (#8) +- Remove `WaitUtils` usage. (#9) +### Dependency Upgrades +- Upgrade to `iexec-common` 8.0.0. (#9) + ## [[1.0.1]](https://github.com/iExecBlockchainComputing/iexec-commons-containers/releases/tag/v1.0.1) 2023-03-16 - Add `settings.gradle` file to set correct project name for SonarCloud analyses. (#5) diff --git a/gradle.properties b/gradle.properties index 6d75b86..e3dc46d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ -version=1.0.1 -iexecCommonVersion=7.0.0 +version=1.0.2 +iexecCommonVersion=8.0.0 nexusUser nexusPassword diff --git a/src/main/java/com/iexec/commons/containers/client/DockerClientInstance.java b/src/main/java/com/iexec/commons/containers/client/DockerClientInstance.java index 348bb81..543aa7c 100644 --- a/src/main/java/com/iexec/commons/containers/client/DockerClientInstance.java +++ b/src/main/java/com/iexec/commons/containers/client/DockerClientInstance.java @@ -29,7 +29,6 @@ import com.github.dockerjava.transport.DockerHttpClient; import com.github.dockerjava.zerodep.ZerodepDockerHttpClient; import com.iexec.common.utils.ArgsUtils; -import com.iexec.common.utils.WaitUtils; import com.iexec.commons.containers.DockerLogs; import com.iexec.commons.containers.DockerRunFinalStatus; import com.iexec.commons.containers.DockerRunRequest; @@ -688,7 +687,12 @@ public int waitContainerUntilExitOrTimeout( if (seconds % 60 == 0) { // don't display logs too often log.info("Container is running [name:{}]", containerName); } - WaitUtils.sleep(1); + try { + TimeUnit.SECONDS.sleep(1); + } catch (InterruptedException e) { + log.error("Sleep was interrupted [exception:{}]", e.getMessage()); + Thread.currentThread().interrupt(); + } isExited = getContainerStatus(containerName).equals(EXITED_STATUS); isTimeout = Instant.now().isAfter(timeoutDate); seconds++; diff --git a/src/test/java/com/iexec/commons/containers/client/DockerClientFactoryTests.java b/src/test/java/com/iexec/commons/containers/client/DockerClientFactoryTests.java index 480cd75..1f3d428 100644 --- a/src/test/java/com/iexec/commons/containers/client/DockerClientFactoryTests.java +++ b/src/test/java/com/iexec/commons/containers/client/DockerClientFactoryTests.java @@ -17,12 +17,10 @@ package com.iexec.commons.containers.client; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; -@Tag("slow") class DockerClientFactoryTests { private static final String DOCKER_IO_USER = "DOCKER_IO_USER"; diff --git a/src/test/java/com/iexec/commons/containers/client/DockerClientInstanceTests.java b/src/test/java/com/iexec/commons/containers/client/DockerClientInstanceTests.java index 06fc5b9..51750e9 100644 --- a/src/test/java/com/iexec/commons/containers/client/DockerClientInstanceTests.java +++ b/src/test/java/com/iexec/commons/containers/client/DockerClientInstanceTests.java @@ -36,7 +36,10 @@ import com.iexec.commons.containers.DockerRunResponse; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.RandomStringUtils; -import org.junit.jupiter.api.*; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.NullSource; import org.junit.jupiter.params.provider.ValueSource; @@ -55,7 +58,6 @@ import static org.mockito.Mockito.*; @Slf4j -@Tag("slow") class DockerClientInstanceTests extends AbstractDockerTests { //classic