-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excavator: Format Java files #1285
Changes from 3 commits
6031bfd
36e4377
a684e6b
cf4139c
915552d
b5d6f00
5b46716
c1e7a8e
4c5bb50
eaf101b
045aaad
56e666a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,8 @@ public void testFromParameters_fillsInDefaults() { | |
ClientConfiguration actual = ClientConfigurations.of(uris, sslFactory, trustManager); | ||
|
||
assertThat(actual.sslSocketFactory()).isInstanceOf(KeepAliveSslSocketFactory.class); | ||
assertThat(((KeepAliveSslSocketFactory) actual.sslSocketFactory()).getDelegate()).isEqualTo(sslFactory); | ||
assertThat(((KeepAliveSslSocketFactory) actual.sslSocketFactory()).getDelegate()) | ||
.isEqualTo(sslFactory); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @iamdanfox @ferozco 0.3.1 made a lot of the fluent assertions line break. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the additional break is fine |
||
assertThat(actual.trustManager()).isEqualTo(trustManager); | ||
assertThat(actual.uris()).isEqualTo(uris); | ||
assertThat(actual.connectTimeout()).isEqualTo(Duration.ofSeconds(10)); | ||
|
@@ -89,8 +90,7 @@ public void testTimeoutMustBeMilliseconds() { | |
.security(SslConfiguration.of(Paths.get("src/test/resources/trustStore.jks"))) | ||
.connectTimeout(Duration.ofNanos(5)) | ||
.build(); | ||
Assertions | ||
.assertThatLoggableExceptionThrownBy(() -> ClientConfigurations.of(serviceConfig)) | ||
Assertions.assertThatLoggableExceptionThrownBy(() -> ClientConfigurations.of(serviceConfig)) | ||
.hasLogMessage("Timeouts with sub-millisecond precision are not supported"); | ||
} | ||
|
||
|
@@ -121,13 +121,12 @@ public void roundRobin_noCooldown() throws Exception { | |
.build(); | ||
|
||
assertThatThrownBy(() -> ClientConfiguration.builder() | ||
.from( | ||
ClientConfigurations.of(serviceConfig)) | ||
.nodeSelectionStrategy(NodeSelectionStrategy.ROUND_ROBIN) | ||
.failedUrlCooldown(Duration.ofMillis(0)) | ||
.build()) | ||
.isInstanceOf(IllegalArgumentException.class) | ||
.hasMessage("If nodeSelectionStrategy is ROUND_ROBIN then failedUrlCooldown must be positive"); | ||
.from(ClientConfigurations.of(serviceConfig)) | ||
.nodeSelectionStrategy(NodeSelectionStrategy.ROUND_ROBIN) | ||
.failedUrlCooldown(Duration.ofMillis(0)) | ||
.build()) | ||
.isInstanceOf(IllegalArgumentException.class) | ||
.hasMessage("If nodeSelectionStrategy is ROUND_ROBIN then failedUrlCooldown must be positive"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is much nicer, exactly how I would have formatted it myself! |
||
} | ||
|
||
@Test | ||
|
@@ -178,5 +177,4 @@ private ServiceConfiguration meshProxyServiceConfig(List<String> theUris, int ma | |
.maxNumRetries(maxNumRetries) | ||
.build(); | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so.. this is the kind of sadness enabled by the quick hack in palantir/palantir-java-format#44