Skip to content

Commit

Permalink
Fix: ResponseCompression option.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock committed Jan 11, 2023
1 parent f1fbe83 commit 60c959c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ class DefaultImpl extends TransportOptions.DefaultImpl implements AwsSdk2Transpo
super(builder);
credentials = builder.credentials;
requestCompressionSize = builder.requestCompressionSize;
responseCompression = builder.responseCompression;
mapper = builder.mapper;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

package org.opensearch.client.transport.aws;

import org.junit.Assert;
import org.junit.Test;

public class AwsSdk2TransportOptionsTestCase extends Assert {
@Test
public void testBuilderResponseCompression() throws Exception {
AwsSdk2TransportOptions options = AwsSdk2TransportOptions.builder()
.setResponseCompression(true)
.setRequestCompressionSize(10)
.build();
assertEquals(10, options.requestCompressionSize().intValue());
assertTrue(options.responseCompression());
}
}

0 comments on commit 60c959c

Please sign in to comment.