fjy closed pull request #6406: ITTLSTest: Retry on "Connection reset by peer".
URL: https://github.com/apache/incubator-druid/pull/6406
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java
 
b/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java
index cb148708454..82c5f9ac16c 100644
--- 
a/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java
+++ 
b/integration-tests/src/test/java/org/apache/druid/tests/security/ITTLSTest.java
@@ -62,7 +62,7 @@
 
   private static final Duration SSL_HANDSHAKE_TIMEOUT = new Duration(30 * 
1000);
 
-  private static final int MAX_BROKEN_PIPE_RETRIES = 30;
+  private static final int MAX_CONNECTION_EXCEPTION_RETRIES = 30;
 
   @Inject
   IntegrationTestingConfig config;
@@ -396,10 +396,11 @@ private void checkFailedAccess(
       catch (RuntimeException re) {
         Throwable rootCause = Throwables.getRootCause(re);
 
-        if (rootCause instanceof IOException && "Broken 
pipe".equals(rootCause.getMessage())) {
-          if (retries > MAX_BROKEN_PIPE_RETRIES) {
+        if (rootCause instanceof IOException && ("Broken 
pipe".equals(rootCause.getMessage())
+                                                 || "Connection reset by 
peer".contains(rootCause.getMessage()))) {
+          if (retries > MAX_CONNECTION_EXCEPTION_RETRIES) {
             Assert.fail(StringUtils.format(
-                "Broken pipe retries exhausted, test failed, did not get %s.",
+                "Broken pipe / connection reset retries exhausted, test 
failed, did not get %s.",
                 expectedException
             ));
           } else {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to