Skip to content

Commit cac1941

Browse files
committed
revert to using default/static host resolver
1 parent b3ab5a2 commit cac1941

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

src/test/java/software/amazon/awssdk/crt/test/EventStreamClientConnectionTest.java

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import software.amazon.awssdk.crt.io.EventLoopGroup;
77
import software.amazon.awssdk.crt.io.ServerBootstrap;
88
import software.amazon.awssdk.crt.io.SocketOptions;
9-
import software.amazon.awssdk.crt.io.HostResolver;
109

1110
import java.io.IOException;
1211
import java.nio.charset.StandardCharsets;
@@ -30,9 +29,8 @@ public void testConnectionHandling() throws ExecutionException, InterruptedExcep
3029
socketOptions.type = SocketOptions.SocketType.STREAM;
3130

3231
EventLoopGroup elGroup = new EventLoopGroup(1);
33-
HostResolver hr = new HostResolver(elGroup);
3432
ServerBootstrap bootstrap = new ServerBootstrap(elGroup);
35-
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, hr);
33+
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null);
3634
final boolean[] connectionReceived = {false};
3735
final boolean[] connectionShutdown = {false};
3836
final ServerConnection[] serverConnections = {null};
@@ -97,7 +95,6 @@ protected void onProtocolMessage(List<Header> headers, byte[] payload, MessageTy
9795
bootstrap.close();
9896
clientBootstrap.close();
9997
clientBootstrap.getShutdownCompleteFuture().get(1, TimeUnit.SECONDS);
100-
hr.close();
10198
elGroup.close();
10299
elGroup.getShutdownCompleteFuture().get(1, TimeUnit.SECONDS);
103100
socketOptions.close();
@@ -111,9 +108,8 @@ public void testConnectionProtocolMessageHandling() throws ExecutionException, I
111108
socketOptions.type = SocketOptions.SocketType.STREAM;
112109

113110
EventLoopGroup elGroup = new EventLoopGroup(1);
114-
HostResolver hr = new HostResolver(elGroup);
115111
ServerBootstrap bootstrap = new ServerBootstrap(elGroup);
116-
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, hr);
112+
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null);
117113
final List<Header>[] receivedMessageHeaders = new List[]{null};
118114
final byte[][] receivedPayload = {null};
119115
final MessageType[] receivedMessageType = {null};
@@ -221,9 +217,8 @@ public void testConnectionProtocolMessageWithExtraHeadersHandling() throws Execu
221217
socketOptions.type = SocketOptions.SocketType.STREAM;
222218

223219
EventLoopGroup elGroup = new EventLoopGroup(1);
224-
HostResolver hr = new HostResolver(elGroup);
225220
ServerBootstrap bootstrap = new ServerBootstrap(elGroup);
226-
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, hr);
221+
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null);
227222
final boolean[] connectionShutdown = {false};
228223
final List<Header>[] receivedMessageHeaders = new List[]{null};
229224
final byte[][] receivedPayload = {null};
@@ -344,7 +339,6 @@ protected void onProtocolMessage(List<Header> headers, byte[] payload, MessageTy
344339
bootstrap.close();
345340
clientBootstrap.close();
346341
clientBootstrap.getShutdownCompleteFuture().get(1, TimeUnit.SECONDS);
347-
hr.close();
348342
elGroup.close();
349343
elGroup.getShutdownCompleteFuture().get(1, TimeUnit.SECONDS);
350344
socketOptions.close();
@@ -358,9 +352,8 @@ public void testContinuationMessageHandling() throws ExecutionException, Interru
358352
socketOptions.type = SocketOptions.SocketType.STREAM;
359353

360354
EventLoopGroup elGroup = new EventLoopGroup(1);
361-
HostResolver hr = new HostResolver(elGroup);
362355
ServerBootstrap bootstrap = new ServerBootstrap(elGroup);
363-
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, hr);
356+
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null);
364357

365358
final boolean[] connectionShutdown = {false};
366359
final String[] receivedOperationName = new String[]{null};
@@ -493,7 +486,6 @@ protected void onContinuationClosed() {
493486
bootstrap.close();
494487
clientBootstrap.close();
495488
clientBootstrap.getShutdownCompleteFuture().get(1, TimeUnit.SECONDS);
496-
hr.close();
497489
elGroup.close();
498490
elGroup.getShutdownCompleteFuture().get(1, TimeUnit.SECONDS);
499491
socketOptions.close();
@@ -507,9 +499,8 @@ public void testContinuationMessageWithExtraHeadersHandling() throws ExecutionEx
507499
socketOptions.type = SocketOptions.SocketType.STREAM;
508500

509501
EventLoopGroup elGroup = new EventLoopGroup(1);
510-
HostResolver hr = new HostResolver(elGroup);
511502
ServerBootstrap bootstrap = new ServerBootstrap(elGroup);
512-
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, hr);
503+
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null);
513504

514505
final boolean[] connectionShutdown = {false};
515506

@@ -664,7 +655,6 @@ protected void onContinuationClosed() {
664655
bootstrap.close();
665656
clientBootstrap.close();
666657
clientBootstrap.getShutdownCompleteFuture().get(1, TimeUnit.SECONDS);
667-
hr.close();
668658
elGroup.close();
669659
elGroup.getShutdownCompleteFuture().get(1, TimeUnit.SECONDS);
670660
socketOptions.close();

0 commit comments

Comments
 (0)