Skip to content

Commit

Permalink
chore: Await Termination for clients in Dynamic Routing Headers Showc…
Browse files Browse the repository at this point in the history
…ase Test (#2748)
  • Loading branch information
lqiu96 authored May 8, 2024
1 parent 3611e8f commit 3352cc9
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import io.grpc.MethodDescriptor;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import org.junit.After;
import org.junit.Before;
Expand Down Expand Up @@ -153,11 +154,21 @@ public void createClients() throws Exception {
}

@After
public void destroyClient() {
public void destroyClient() throws InterruptedException {
grpcClient.close();
httpJsonClient.close();
grpcComplianceClient.close();

httpJsonClient.close();
httpJsonComplianceClient.close();

grpcClient.awaitTermination(TestClientInitializer.AWAIT_TERMINATION_SECONDS, TimeUnit.SECONDS);
grpcComplianceClient.awaitTermination(
TestClientInitializer.AWAIT_TERMINATION_SECONDS, TimeUnit.SECONDS);

httpJsonClient.awaitTermination(
TestClientInitializer.AWAIT_TERMINATION_SECONDS, TimeUnit.SECONDS);
httpJsonComplianceClient.awaitTermination(
TestClientInitializer.AWAIT_TERMINATION_SECONDS, TimeUnit.SECONDS);
}

@Test
Expand Down

0 comments on commit 3352cc9

Please sign in to comment.