Skip to content
Prev Previous commit
Next Next commit
Add more logging, try just "hello"
  • Loading branch information
bsideup committed Nov 20, 2019
commit eebb9ff4540a258678fae27bd507e9d22566babd
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void attachContainerClosesStdoutWhenContainerExits() throws Exception {
DockerClient dockerClient = dockerRule.getClient();

CreateContainerResponse container = dockerClient.createContainerCmd(DEFAULT_IMAGE)
.withCmd("echo", "hello world")
.withCmd("echo", "hello")
.withTty(false)
.exec();
LOG.info("Created container: {}", container.toString());
Expand All @@ -238,13 +238,20 @@ public void onStart(Closeable stream) {

@Override
public void onNext(Frame item) {
LOG.info("Got frame: {}", item);
if (item.getStreamType() == StreamType.STDOUT) {
gotLineAtNanos.set(System.nanoTime());
gotLine.countDown();
}
super.onNext(item);
}

@Override
public void onError(Throwable throwable) {
LOG.info("Got error: ", throwable);
super.onError(throwable);
}

@Override
public void onComplete() {
completed.countDown();
Expand Down