Skip to content

Commit 752627a

Browse files
committed
Wait for servers to be terminated in tearDown in IntegrationTest.java.
1 parent b021a21 commit 752627a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

s2a/src/test/java/io/grpc/s2a/handshaker/IntegrationTest.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import javax.net.ssl.SSLSessionContext;
5353
import org.junit.After;
5454
import org.junit.Before;
55-
import org.junit.BeforeClass;
5655
import org.junit.Test;
5756
import org.junit.runner.RunWith;
5857
import org.junit.runners.JUnit4;
@@ -140,11 +139,6 @@ public final class IntegrationTest {
140139
private String serverAddress;
141140
private Server server;
142141

143-
@BeforeClass
144-
public static void setUpClass() {
145-
System.setProperty("GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST", "false");
146-
}
147-
148142
@Before
149143
public void setUp() throws Exception {
150144
s2aPort = Utils.pickUnusedPort();
@@ -186,9 +180,13 @@ public void setUp() throws Exception {
186180

187181
@After
188182
public void tearDown() throws Exception {
183+
server.awaitTermination(10, SECONDS);
189184
server.shutdown();
185+
s2aServer.awaitTermination(10, SECONDS);
190186
s2aServer.shutdown();
187+
s2aDelayServer.awaitTermination(10, SECONDS);
191188
s2aDelayServer.shutdown();
189+
mtlsS2AServer.awaitTermination(10, SECONDS);
192190
mtlsS2AServer.shutdown();
193191
}
194192

0 commit comments

Comments
 (0)