Skip to content

Commit 5598901

Browse files
author
Stephane Landelle
committed
append to previous commit
1 parent 6530497 commit 5598901

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api/src/test/java/org/asynchttpclient/async/RetryRequestTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414

1515
import org.asynchttpclient.AsyncHttpClient;
1616
import org.asynchttpclient.AsyncHttpClientConfig;
17+
import org.asynchttpclient.util.AsyncHttpProviderUtils;
1718
import org.eclipse.jetty.server.Request;
1819
import org.eclipse.jetty.server.handler.AbstractHandler;
1920
import org.testng.annotations.Test;
2021

2122
import javax.servlet.ServletException;
2223
import javax.servlet.http.HttpServletRequest;
2324
import javax.servlet.http.HttpServletResponse;
25+
2426
import java.io.IOException;
2527
import java.io.OutputStream;
2628

@@ -76,7 +78,7 @@ public void testMaxRetry() throws Exception {
7678
} catch (Exception t) {
7779
assertNotNull(t.getCause());
7880
assertEquals(t.getCause().getClass(), IOException.class);
79-
if (!t.getCause().getMessage().startsWith("Remotely Closed")) {
81+
if (t.getCause() != AsyncHttpProviderUtils.REMOTELY_CLOSED_EXCEPTION) {
8082
fail();
8183
}
8284
} finally {

0 commit comments

Comments
 (0)