Fix TcpTransport compression test (#35396)

This commit fixes an assertion in the TcpTransportTests compresssion
test.
This commit is contained in:
Tim Brooks 2018-11-08 18:04:48 -07:00 committed by GitHub
parent b485e69a5f
commit bccc99c2be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -206,7 +206,9 @@ public class TcpTransportTests extends ESTestCase {
@Override
public NodeChannels openConnection(DiscoveryNode node, ConnectionProfile connectionProfile) {
assertTrue(connectionProfile.getCompressionEnabled());
if (compressed) {
assertTrue(connectionProfile.getCompressionEnabled());
}
int numConnections = connectionProfile.getNumConnections();
ArrayList<TcpChannel> fakeChannels = new ArrayList<>(numConnections);
for (int i = 0; i < numConnections; ++i) {