Skip to content

Commit

Permalink
Default service name
Browse files Browse the repository at this point in the history
  • Loading branch information
pavetok committed Mar 8, 2024
1 parent 6db3955 commit 48eeab3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public abstract class AbstractResilienceTest {
@BeforeAll
void abstractBeforeAll() {
services = dockerClient.listContainersCmd().withShowAll(true).exec().stream()
.collect(groupingBy(container -> container.getLabels().get("com.docker.compose.service")));
.collect(groupingBy(
container -> container.getLabels().getOrDefault("com.docker.compose.service", "unknown")));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ public class Demiurge {

public void starts(@NonNull List<Container> containers) {
try {
containers.forEach(container -> dockerClient.startContainerCmd(container.getId()).exec());
containers.forEach(container ->
dockerClient.startContainerCmd(container.getId()).exec());
} catch (NotModifiedException e) {
LOG.debug("Already started");
}
containers.forEach(container ->
await(container.getNames()[0])
.atMost(SERVICE_START_TIMEOUT)
.until(() -> isStarted(container)));
await(container.getNames()[0]).atMost(SERVICE_START_TIMEOUT).until(() -> isStarted(container)));
}

public void kills(@NonNull Container container) {
Expand Down

0 comments on commit 48eeab3

Please sign in to comment.