DonalEvans commented on a change in pull request #6826:
URL: https://github.com/apache/geode/pull/6826#discussion_r700435932



##########
File path: 
geode-apis-compatible-with-redis/src/distributedTest/java/org/apache/geode/redis/SSLDUnitTest.java
##########
@@ -87,8 +87,9 @@ public void 
givenMutualAuthentication_clientErrorsWithoutKeystore() throws Excep
 
     // Create the client without a keystore
     try (Jedis jedis = createClient(false, false)) {
-      assertThatThrownBy(jedis::ping)
-          .hasMessageContaining("readHandshakeRecord");
+      assertThatThrownBy(jedis::ping).satisfiesAnyOf(
+          e -> assertThat(e.getMessage()).contains("SSLException"),
+          e -> assertThat(e.getMessage()).contains("SSLHandshakeException"));

Review comment:
       These assertions could be combined to a single one:
   ```
   assertThatThrownBy(jedis::ping).isInstanceOf(SSLException.class);
   ```
   Since `SSLHandshakeException` extends `SSLException`. Alternately, you could 
use `satisfiesAnyOf()` with assertions on the message body rather than 
exception name, but this might be trickier if you don't know all the different 
messages that might be expected in exceptions here.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to