kirklund commented on a change in pull request #5879:
URL: https://github.com/apache/geode/pull/5879#discussion_r552895539
##########
File path:
geode-core/src/integrationTest/java/org/apache/geode/internal/SSLConfigJUnitTest.java
##########
@@ -153,6 +156,66 @@ public static void initializeSSLMaps() {
@After
public void tearDownTest() {}
+ @Test
+ public void slowerReceiverShouldThrowExceptionWhenEnabledClusterTLS() throws
Exception {
+ Properties props = new Properties();
+ props.setProperty(SSL_ENABLED_COMPONENTS, "cluster");
+ props.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "1");
+
+ try {
Review comment:
I recommend using AssertJ catchThrowable for these expected exceptions.
It would end up looking like:
```
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowable;
Throwable thrown = catchThrowable(() -> new DistributionConfigImpl(props));
assertThat(thrown)
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("async-distribution-timeout greater than 0 is not
allowed with cluster TLS/SSL.");
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]