Skip to content

Commit bccc99c

Browse files
authored
Fix TcpTransport compression test (#35396)
This commit fixes an assertion in the TcpTransportTests compresssion test.
1 parent b485e69 commit bccc99c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/test/java/org/elasticsearch/transport/TcpTransportTests.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ protected void stopInternal() {
206206

207207
@Override
208208
public NodeChannels openConnection(DiscoveryNode node, ConnectionProfile connectionProfile) {
209-
assertTrue(connectionProfile.getCompressionEnabled());
209+
if (compressed) {
210+
assertTrue(connectionProfile.getCompressionEnabled());
211+
}
210212
int numConnections = connectionProfile.getNumConnections();
211213
ArrayList<TcpChannel> fakeChannels = new ArrayList<>(numConnections);
212214
for (int i = 0; i < numConnections; ++i) {

0 commit comments

Comments
 (0)