Skip to content

Commit aac988d

Browse files
committed
fixed code style
1 parent 13c3b3c commit aac988d

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

exporters/sender/okhttp/src/test/java/io/opentelemetry/exporter/sender/okhttp/internal/RetryInterceptorTest.java

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -234,25 +234,34 @@ void isRetryableException() {
234234
assertThat(retrier.shouldRetryOnException(new HttpRetryException("timeout retry", 400)))
235235
.isTrue();
236236
}
237+
237238
@Test
238239
void isRetryableExceptionDefaultBehaviour() {
239-
RetryInterceptor retryInterceptor = new RetryInterceptor(RetryPolicy.getDefault(),
240-
OkHttpHttpSender::isRetryable);
241-
assertThat(retryInterceptor
242-
.shouldRetryOnException(new SocketTimeoutException("Connect timed out"))).isTrue();
240+
RetryInterceptor retryInterceptor =
241+
new RetryInterceptor(RetryPolicy.getDefault(), OkHttpHttpSender::isRetryable);
242+
assertThat(
243+
retryInterceptor.shouldRetryOnException(
244+
new SocketTimeoutException("Connect timed out")))
245+
.isTrue();
243246
assertThat(retryInterceptor.shouldRetryOnException(new IOException("Connect timed out")))
244247
.isFalse();
245248
}
249+
246250
@Test
247251
void isRetryableExceptionCustomRetryPredicate() {
248-
RetryInterceptor retryInterceptor = new RetryInterceptor(RetryPolicy.builder()
249-
.setRetryExceptionPredicate((IOException e) -> e.getMessage().equals("retry")).build(),
250-
OkHttpHttpSender::isRetryable);
252+
RetryInterceptor retryInterceptor =
253+
new RetryInterceptor(
254+
RetryPolicy.builder()
255+
.setRetryExceptionPredicate((IOException e) -> e.getMessage().equals("retry"))
256+
.build(),
257+
OkHttpHttpSender::isRetryable);
251258

252259
assertThat(retryInterceptor.shouldRetryOnException(new IOException("some message"))).isFalse();
253260
assertThat(retryInterceptor.shouldRetryOnException(new IOException("retry"))).isTrue();
254-
assertThat(retryInterceptor
255-
.shouldRetryOnException(new SocketTimeoutException("Connect timed out"))).isTrue();
261+
assertThat(
262+
retryInterceptor.shouldRetryOnException(
263+
new SocketTimeoutException("Connect timed out")))
264+
.isTrue();
256265
}
257266

258267
private Response sendRequest() throws IOException {

0 commit comments

Comments
 (0)