Skip to content

Commit 4548fc9

Browse files
committed
Explicitly close connection
Signed-off-by: Craig Perkins <[email protected]>
1 parent c86e827 commit 4548fc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/framework/src/main/java/org/opensearch/transport/AbstractSimpleTransportTestCase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3122,6 +3122,8 @@ public TransportResponse read(final StreamInput in) {
31223122
}
31233123
}
31243124
);
3125+
connection.close();
3126+
serviceC.disconnectFromNode(nodeA);
31253127
assertThat(te.get(), not(nullValue()));
31263128

31273129
if (failToSendException instanceof IllegalStateException) {
@@ -3132,8 +3134,6 @@ public TransportResponse read(final StreamInput in) {
31323134
assertThat(te.get().getMessage(), equalTo("fail to send"));
31333135
assertThat(te.get().getCause(), nullValue());
31343136
}
3135-
} finally {
3136-
IOUtils.close(serviceC);
31373137
}
31383138

31393139
}

0 commit comments

Comments
 (0)