Skip to content

Commit 1f0942c

Browse files
committed
update stability tests
1 parent 5ecfb2d commit 1f0942c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/stability-tests/src/it/java/software/amazon/awssdk/stability/tests/utils/StabilityTestRunner.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,10 @@ private static CompletableFuture<?> handleException(CompletableFuture<?> future,
249249
log.error(() -> "An exception was thrown ", t);
250250
if (cause instanceof SdkServiceException) {
251251
exceptionCounter.addServiceException();
252-
} else if (isIOException(cause)) {
252+
} else if (isIOExceptionOrHasIOCause(cause)) {
253253
exceptionCounter.addIoException();
254254
} else if (cause instanceof SdkClientException) {
255-
if (isIOException(cause.getCause())) {
255+
if (isIOExceptionOrHasIOCause(cause.getCause())) {
256256
exceptionCounter.addIoException();
257257
} else {
258258
exceptionCounter.addClientException();
@@ -264,8 +264,8 @@ private static CompletableFuture<?> handleException(CompletableFuture<?> future,
264264
});
265265
}
266266

267-
private static boolean isIOException(Throwable throwable) {
268-
return throwable.getClass().isAssignableFrom(IOException.class);
267+
private static boolean isIOExceptionOrHasIOCause(Throwable throwable) {
268+
return throwable instanceof IOException || throwable.getCause() instanceof IOException;
269269
}
270270

271271
private TestResult generateTestResult(int totalRequestNumber, String testName, ExceptionCounter exceptionCounter,

0 commit comments

Comments
 (0)