Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #752 from spotify/fix-ConnectionPoolTest
Browse files Browse the repository at this point in the history
ConnectionPoolTest: avoid tag operations
  • Loading branch information
mattnworb authored May 21, 2017
2 parents a445e55 + 86b04dc commit f4ce614
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Rule;
Expand All @@ -50,8 +51,6 @@ public class ConnectionPoolTest {
private static final String BUSYBOX = "busybox";
private static final String BUSYBOX_LATEST = BUSYBOX + ":latest";
private static final String BUSYBOX_BUILDROOT_2013_08_1 = BUSYBOX + ":buildroot-2013.08.1";
private static final String MEMCACHED = "rohan/memcached-mini";
private static final String CIRROS_PRIVATE = "dxia/cirros-private";

private static final Logger log = LoggerFactory.getLogger(ConnectionPoolTest.class);

Expand Down Expand Up @@ -81,9 +80,6 @@ public Exception call() throws Exception {
try (DockerClient docker = DefaultDockerClient.fromEnv().build()) {
docker.pull(ConnectionPoolTest.BUSYBOX_LATEST);
docker.pull(ConnectionPoolTest.BUSYBOX_BUILDROOT_2013_08_1);
final String name = "test-repo/tag-force:sometag";
docker.tag(ConnectionPoolTest.BUSYBOX_LATEST, name);
docker.tag(ConnectionPoolTest.BUSYBOX_BUILDROOT_2013_08_1, name, true);
} catch (InterruptedException | DockerException | DockerCertificateException e) {
ConnectionPoolTest.log.error(
"Error running task: {}", e.getMessage(), e
Expand All @@ -97,7 +93,7 @@ public Exception call() throws Exception {
);
}
executor.shutdown();
while (!executor.isTerminated()) {};
executor.awaitTermination(30, TimeUnit.SECONDS);
for (final Future<Exception> task : tasks) {
MatcherAssert.assertThat(task.get(), Matchers.nullValue());
}
Expand Down

0 comments on commit f4ce614

Please sign in to comment.