|
18 | 18 | import static org.assertj.core.api.Assertions.assertThat; |
19 | 19 | import static org.assertj.core.api.Assertions.assertThatThrownBy; |
20 | 20 |
|
21 | | -import java.io.BufferedOutputStream; |
22 | 21 | import java.io.ByteArrayInputStream; |
23 | 22 | import java.io.IOException; |
24 | 23 | import java.io.OutputStream; |
25 | 24 | import java.util.concurrent.Executors; |
26 | 25 | import org.junit.jupiter.api.BeforeEach; |
27 | 26 | import org.junit.jupiter.api.Test; |
28 | | -import software.amazon.awssdk.core.ResponseBytes; |
29 | 27 | import software.amazon.awssdk.core.async.AsyncRequestBody; |
30 | 28 | import software.amazon.awssdk.core.async.AsyncResponseTransformer; |
31 | 29 | import software.amazon.awssdk.core.interceptor.Context; |
@@ -101,11 +99,11 @@ public void streamingOutputOperation_syncClient_file_recordsMetadata() throws IO |
101 | 99 | } |
102 | 100 |
|
103 | 101 | @Test |
104 | | - public void streamingOutputOperation_syncClient_stream_recordsMetadata() throws IOException { |
| 102 | + public void streamingOutputOperation_syncClient_stream_recordsMetadata() { |
105 | 103 | callStreamingOutputOperation(syncClient(), ResponseTransformer.toOutputStream(new OutputStream() { |
106 | 104 | @Override |
107 | | - public void write(int b) throws IOException { |
108 | | - |
| 105 | + public void write(int b) { |
| 106 | + // no-op |
109 | 107 | } |
110 | 108 | })); |
111 | 109 | assertThat(interceptor.userAgent()).contains("md/rt#s"); |
@@ -175,12 +173,10 @@ private void callStreamingOutputOperation( |
175 | 173 |
|
176 | 174 | public static class CapturingInterceptor implements ExecutionInterceptor { |
177 | 175 | private Context.BeforeTransmission context; |
178 | | - private ExecutionAttributes executionAttributes; |
179 | 176 |
|
180 | 177 | @Override |
181 | 178 | public void beforeTransmission(Context.BeforeTransmission context, ExecutionAttributes executionAttributes) { |
182 | 179 | this.context = context; |
183 | | - this.executionAttributes = executionAttributes; |
184 | 180 | throw new RuntimeException("stop"); |
185 | 181 | } |
186 | 182 |
|
|
0 commit comments