Skip to content
Merged
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 @@ -45,6 +45,7 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeoutException;
import java.util.logging.Logger;
import org.junit.After;
import org.junit.Before;
Expand Down Expand Up @@ -77,7 +78,10 @@ public void tearDown() throws Exception {

@Test
public void callS2AServerOnce_getTlsConfiguration_returnsValidResult()
throws InterruptedException, IOException, java.util.concurrent.ExecutionException {
throws InterruptedException,
IOException,
java.util.concurrent.ExecutionException,
TimeoutException {
ExecutorService executor = Executors.newSingleThreadExecutor();
logger.info("Client connecting to: " + serverAddress);
ManagedChannel channel =
Expand Down Expand Up @@ -121,6 +125,7 @@ public void onCompleted() {
// Mark the end of requests.
requestObserver.onCompleted();
// Wait for receiving to happen.
respFuture.get(5, SECONDS);
} finally {
channel.shutdown();
channel.awaitTermination(1, SECONDS);
Expand Down Expand Up @@ -165,7 +170,7 @@ public void onCompleted() {

@Test
public void callS2AServerOnce_validatePeerCertifiate_returnsValidResult()
throws InterruptedException, java.util.concurrent.ExecutionException {
throws InterruptedException, java.util.concurrent.ExecutionException, TimeoutException {
ExecutorService executor = Executors.newSingleThreadExecutor();
logger.info("Client connecting to: " + serverAddress);
ManagedChannel channel =
Expand Down Expand Up @@ -212,6 +217,7 @@ public void onCompleted() {
// Mark the end of requests.
requestObserver.onCompleted();
// Wait for receiving to happen.
respFuture.get(5, SECONDS);
} finally {
channel.shutdown();
channel.awaitTermination(1, SECONDS);
Expand Down