X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private JerseyDockerHttpClient(
RequestConfig.Builder requestConfigBuilder = RequestConfig.custom();

// logging may disabled via log level
clientConfig.register(new SelectiveLoggingFilter(LOGGER, true));
clientConfig.register(new SelectiveLoggingFilter(LOGGER, false));

if (readTimeout != null) {
requestConfigBuilder.setSocketTimeout(readTimeout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
import static org.hamcrest.Matchers.emptyString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.*;

/**
* @author Kanstantsin Shautsou
Expand Down Expand Up @@ -80,6 +79,9 @@ public void onNext(Frame frame) {
.withStdIn(in)
.exec(callback);

assertTrue("Processing of the response should start shortly after executing `attachContainerCmd`",
callback.awaitStarted(5, SECONDS));

dockerClient.startContainerCmd(container.getId()).exec();

out.write((snippet + "\n").getBytes());
Expand Down Expand Up @@ -123,6 +125,9 @@ public void onNext(Frame frame) {
.withLogs(true)
.exec(callback);

assertTrue("Processing of the response should start shortly after executing `attachContainerCmd`",
callback.awaitStarted(5, SECONDS));

dockerClient.startContainerCmd(container.getId()).exec();

callback.awaitCompletion(30, TimeUnit.SECONDS);
Expand Down Expand Up @@ -164,6 +169,9 @@ public void onNext(Frame frame) {
.withFollowStream(true)
.exec(callback);

assertTrue("Processing of the response should start shortly after executing `attachContainerCmd`",
callback.awaitStarted(5, SECONDS));

dockerClient.startContainerCmd(container.getId()).exec();

callback.awaitCompletion(15, TimeUnit.SECONDS);
Expand Down Expand Up @@ -213,6 +221,9 @@ public void onNext(Frame frame) {
.withStdIn(stdin)
.exec(callback);

assertFalse("Processing of the response is not expected to be started" +
" because `attachContainerCmd` with stdin is not supported", callback.awaitStarted(5, SECONDS));

dockerClient.startContainerCmd(container.getId()).exec();

callback.awaitCompletion(30, TimeUnit.SECONDS);
Expand Down
X Tutup