Skip to content

Added withLogConsumer() method to DockerComposeContainer - #629

Merged
bsideup merged 3 commits into
testcontainers:masterfrom
barrycommins:compose-log-consumer-pr
Apr 7, 2018
Merged

bsideup merged 3 commits into
testcontainers:masterfrom
barrycommins:compose-log-consumer-pr

Conversation

@barrycommins

Copy link
Copy Markdown
Contributor

Added withLogConsumer(String serviceName, Consumer<OutputFrame> consumer) method to DockerComposeContainer

Fixes #605

.withExposedService("redis_1", 6379)
.withLogConsumer("redis_1", logConsumer);

environment.starting(Description.createTestDescription(Object.class, "name"));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. please add try {} finally { }, otherwise this redis image will remain until the JVM exits
  2. use Description.EMPTY

@bsideup bsideup added this to the next milestone Apr 6, 2018

@kiview kiview left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'd check this change on Docker for Windows on the weekend, there are sometimes some quirks involved on Docker-Compose on Windows, but I see no reason why it should not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants