Skip to content

Commit 1d46d58

Browse files
committed
try using created eventloop group for host resolver
1 parent 903497b commit 1d46d58

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ public void testConnectionHandling() throws ExecutionException, InterruptedExcep
2929
socketOptions.type = SocketOptions.SocketType.STREAM;
3030

3131
EventLoopGroup elGroup = new EventLoopGroup(1);
32+
HostResolver hr = new HostResolver(elGroup);
3233
ServerBootstrap bootstrap = new ServerBootstrap(elGroup);
33-
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null);
34+
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, hr);
3435
final boolean[] connectionReceived = {false};
3536
final boolean[] connectionShutdown = {false};
3637
final ServerConnection[] serverConnections = {null};
@@ -108,8 +109,9 @@ public void testConnectionProtocolMessageHandling() throws ExecutionException, I
108109
socketOptions.type = SocketOptions.SocketType.STREAM;
109110

110111
EventLoopGroup elGroup = new EventLoopGroup(1);
112+
HostResolver hr = new HostResolver(elGroup);
111113
ServerBootstrap bootstrap = new ServerBootstrap(elGroup);
112-
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null);
114+
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, hr);
113115
final List<Header>[] receivedMessageHeaders = new List[]{null};
114116
final byte[][] receivedPayload = {null};
115117
final MessageType[] receivedMessageType = {null};
@@ -216,8 +218,9 @@ public void testConnectionProtocolMessageWithExtraHeadersHandling() throws Execu
216218
socketOptions.type = SocketOptions.SocketType.STREAM;
217219

218220
EventLoopGroup elGroup = new EventLoopGroup(1);
221+
HostResolver hr = new HostResolver(elGroup);
219222
ServerBootstrap bootstrap = new ServerBootstrap(elGroup);
220-
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null);
223+
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, hr);
221224
final boolean[] connectionShutdown = {false};
222225
final List<Header>[] receivedMessageHeaders = new List[]{null};
223226
final byte[][] receivedPayload = {null};
@@ -351,8 +354,9 @@ public void testContinuationMessageHandling() throws ExecutionException, Interru
351354
socketOptions.type = SocketOptions.SocketType.STREAM;
352355

353356
EventLoopGroup elGroup = new EventLoopGroup(1);
357+
HostResolver hr = new HostResolver(elGroup);
354358
ServerBootstrap bootstrap = new ServerBootstrap(elGroup);
355-
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null);
359+
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, hr);
356360

357361
final boolean[] connectionShutdown = {false};
358362
final String[] receivedOperationName = new String[]{null};
@@ -498,8 +502,9 @@ public void testContinuationMessageWithExtraHeadersHandling() throws ExecutionEx
498502
socketOptions.type = SocketOptions.SocketType.STREAM;
499503

500504
EventLoopGroup elGroup = new EventLoopGroup(1);
505+
HostResolver hr = new HostResolver(elGroup);
501506
ServerBootstrap bootstrap = new ServerBootstrap(elGroup);
502-
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null);
507+
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, hr);
503508

504509
final boolean[] connectionShutdown = {false};
505510

0 commit comments

Comments
 (0)