Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Excavator: Upgrades Baseline to the latest version
Browse files Browse the repository at this point in the history
svc-excavator-bot committed Oct 10, 2019
1 parent 4878a4c commit ec81568
Showing 34 changed files with 73 additions and 68 deletions.
8 changes: 5 additions & 3 deletions .baseline/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -84,11 +84,13 @@
<module name="AvoidStarImport"/> <!-- Java Style Guide: No wildcard imports -->
<module name="AvoidStaticImport"> <!-- Java Style Guide: No static imports -->
<property name="excludes" value="
com.google.common.base.Preconditions.*,
com.palantir.logsafe.Preconditions.*,
java.util.Collections.*,
java.util.stream.Collectors.*,
com.palantir.logsafe.Preconditions.*,
com.google.common.base.Preconditions.*,
org.apache.commons.lang3.Validate.*"/>
org.apache.commons.lang3.Validate.*,
org.assertj.core.api.Assertions.*,
org.mockito.Mockito.*"/>
</module>
<module name="ClassTypeParameterName"> <!-- Java Style Guide: Type variable names -->
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
1 change: 1 addition & 0 deletions .baseline/spotless/eclipse.xml
Original file line number Diff line number Diff line change
@@ -92,6 +92,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.netflix.nebula:gradle-dependency-lock-plugin:7.0.1'
classpath 'com.netflix.nebula:nebula-publishing-plugin:14.0.0'
classpath 'com.palantir.baseline:gradle-baseline-java:2.7.0'
classpath 'com.palantir.baseline:gradle-baseline-java:2.19.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.1.0'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.12.4'
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ Socket wrap(Socket socket) throws SocketException {
return socket;
}

@Override
public String toString() {
return "KeepAliveSslSocketFactory{delegate=" + delegate + '}';
}
Original file line number Diff line number Diff line change
@@ -101,7 +101,7 @@ public void meshProxy_maxRetriesMustBe0() throws Exception {

ClientConfiguration validConfig = ClientConfigurations.of(meshProxyServiceConfig(uris, 0));
assertThat(validConfig.meshProxy()).isEqualTo(Optional.of(HostAndPort.fromParts("localhost", 1234)));
assertThat(validConfig.maxNumRetries()).isEqualTo(0);
assertThat(validConfig.maxNumRetries()).isZero();
}

@Test
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ public void deserializeJdk8ModulePresentOptional() throws IOException {

@Test
public void deserializeJdk8ModuleAbsentOptional() throws IOException {
assertThat(MAPPER.readValue("null", Optional.class)).isEqualTo(Optional.empty());
assertThat(MAPPER.readValue("null", Optional.class)).isNotPresent();
}

@Test
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ public enum NeverRetryingBackoffStrategy implements BackoffStrategy {
INSTANCE;

@Override
public boolean backoff(int numFailedAttempts) {
public boolean backoff(int _numFailedAttempts) {
return false;
}
}
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ public PathTemplateHeaderEnrichmentContract(Contract delegate) {
}

@Override
protected void processMetadata(Class<?> targetType, Method method, MethodMetadata metadata) {
protected void processMetadata(Class<?> _targetType, Method _method, MethodMetadata metadata) {
metadata.template()
.header(OkhttpTraceInterceptor.PATH_TEMPLATE_HEADER,
metadata.template().method() + " "
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ public enum PathTemplateHeaderRewriter implements RequestInterceptor {
INSTANCE;

@Override
public void apply(RequestTemplate template) {
public void apply(RequestTemplate _template) {
// nop
}
}
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ public SlashEncodingContract(Contract delegate) {
}

@Override
protected void processMetadata(Class<?> targetType, Method method, MethodMetadata metadata) {
protected void processMetadata(Class<?> _targetType, Method _method, MethodMetadata metadata) {
metadata.template().decodeSlash(false);
}
}
Original file line number Diff line number Diff line change
@@ -50,13 +50,13 @@ public void testConfigRefresh() throws Exception {
server1.enqueue(new MockResponse().setBody("\"server1\""));
assertThat(proxy.string()).isEqualTo("server1");
assertThat(server1.getRequestCount()).isEqualTo(1);
assertThat(server2.getRequestCount()).isEqualTo(0);
assertThat(server2.getRequestCount()).isZero();

// Call 2
server1.enqueue(new MockResponse().setBody("\"server1\""));
assertThat(proxy.string()).isEqualTo("server1");
assertThat(server1.getRequestCount()).isEqualTo(2);
assertThat(server2.getRequestCount()).isEqualTo(0);
assertThat(server2.getRequestCount()).isZero();

// Switch config
refreshableConfig.set(config2);
Original file line number Diff line number Diff line change
@@ -89,13 +89,13 @@ public void testAuthenticatedProxy() throws Exception {
private static ProxySelector createProxySelector(String host, int port) {
return new ProxySelector() {
@Override
public List<Proxy> select(URI uri) {
public List<Proxy> select(URI _uri) {
InetSocketAddress addr = new InetSocketAddress(host, port);
return ImmutableList.of(new Proxy(Proxy.Type.HTTP, addr));
}

@Override
public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {}
public void connectFailed(URI _uri, SocketAddress _sa, IOException _ioe) {}
};
}
}
Original file line number Diff line number Diff line change
@@ -145,12 +145,12 @@ private void runTwoRequestsInParallel() {
ExecutorService executor = Executors.newFixedThreadPool(2);
CompletableFuture<?> first = CompletableFuture.runAsync(() -> {
Tracer.initTrace(Optional.of(true), "first");
OpenSpan ignored = Tracer.startSpan("");
Tracer.startSpan("");
service.string();
}, executor);
CompletableFuture<?> second = CompletableFuture.runAsync(() -> {
Tracer.initTrace(Optional.of(true), "second");
OpenSpan ignored = Tracer.startSpan("");
Tracer.startSpan("");
service.string();
}, executor);
first.join();
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ public void testOptional() {
@Test
public void testNonOptional() {
assertThat(service.getNonOptional("something")).isEqualTo(ImmutableMap.of("something", "something"));
assertThat(service.getNonOptional(null)).isEqualTo(ImmutableMap.<String, String>of());
assertThat(service.getNonOptional(null)).isEmpty();
}

@Test
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@

public class GuavaTestServer extends Application<Configuration> {
@Override
public final void run(Configuration config, final Environment env) throws Exception {
public final void run(Configuration _config, final Environment env) throws Exception {
env.jersey().register(ConjureJerseyFeature.INSTANCE);
env.jersey().register(new JacksonMessageBodyProvider(ObjectMappers.newServerObjectMapper()));
env.jersey().register(new TestResource());
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ public void testOptional() {
@Test
public void testNonOptional() {
assertThat(service.getNonOptional("something")).isEqualTo(ImmutableMap.of("something", "something"));
assertThat(service.getNonOptional(null)).isEqualTo(ImmutableMap.<String, String>of());
assertThat(service.getNonOptional(null)).isEmpty();
}

@Test
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@

public class Java8TestServer extends Application<Configuration> {
@Override
public final void run(Configuration config, final Environment env) throws Exception {
public final void run(Configuration _config, final Environment env) throws Exception {
env.jersey().register(ConjureJerseyFeature.INSTANCE);
env.jersey().register(new JacksonMessageBodyProvider(ObjectMappers.newServerObjectMapper()));
env.jersey().register(new EmptyOptionalTo204ExceptionMapper());
@@ -61,7 +61,7 @@ public final void run(Configuration config, final Environment env) throws Except
@Provider
private static final class EmptyOptionalTo204ExceptionMapper implements ExceptionMapper<EmptyOptionalException> {
@Override
public Response toResponse(EmptyOptionalException exception) {
public Response toResponse(EmptyOptionalException _exception) {
return Response.noContent().build();
}
}
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ public void initialize(Bootstrap<ServiceConfigTestAppConfig> bootstrap) {
}

@Override
public void run(ServiceConfigTestAppConfig configuration, Environment environment) throws Exception {
public void run(ServiceConfigTestAppConfig _configuration, Environment environment) throws Exception {
environment.jersey().register(new Resource());
}

Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@ public interface Service {

public static class Server extends Application<Configuration> {
@Override
public final void run(Configuration config, final Environment env) throws Exception {
public final void run(Configuration _config, final Environment env) throws Exception {
env.jersey().register(resource);
}
}
Original file line number Diff line number Diff line change
@@ -140,9 +140,9 @@ public void testServiceException() throws IOException {

Map<String, Object> rawError =
ObjectMappers.newClientObjectMapper().readValue(body, new TypeReference<Map<String, Object>>() {});
assertThat(rawError.get("errorCode")).isEqualTo(ErrorType.INVALID_ARGUMENT.code().toString());
assertThat(rawError.get("errorName")).isEqualTo(ErrorType.INVALID_ARGUMENT.name());
assertThat(rawError.get("parameters")).isEqualTo(ImmutableMap.of("arg", "value"));
assertThat(rawError).containsEntry("errorCode", ErrorType.INVALID_ARGUMENT.code().toString());
assertThat(rawError).containsEntry("errorName", ErrorType.INVALID_ARGUMENT.name());
assertThat(rawError).containsEntry("parameters", ImmutableMap.of("arg", "value"));
}

@Test
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ final class AsyncSerializableErrorCallAdapterFactory extends CallAdapter.Factory
private AsyncSerializableErrorCallAdapterFactory() {}

@Override
public CallAdapter<?, ?> get(Type returnType, Annotation[] annotations, Retrofit retrofit) {
public CallAdapter<?, ?> get(Type returnType, Annotation[] _annotations, Retrofit _retrofit) {
Type outerType = getRawType(returnType);
if (outerType != CompletableFuture.class && outerType != ListenableFuture.class) {
return null;
@@ -91,15 +91,15 @@ public boolean cancel(boolean mayInterruptIfRunning) {
}

@Override
public void onResponse(Call<R> call, Response<R> response) {
public void onResponse(Call<R> _call, Response<R> response) {
boolean futureWasCancelled = !set(response.body());
if (futureWasCancelled) {
close(response);
}
}

@Override
public void onFailure(Call<R> call, Throwable throwable) {
public void onFailure(Call<R> _call, Throwable throwable) {
// TODO(rfink): Would be good to not leak okhttp internals here
if (throwable instanceof IoRemoteException) {
setException(((IoRemoteException) throwable).getWrappedException());
@@ -157,15 +157,15 @@ public boolean cancel(boolean mayInterruptIfRunning) {

call.enqueue(new Callback<R>() {
@Override
public void onResponse(Call<R> call, Response<R> response) {
public void onResponse(Call<R> _call, Response<R> response) {
boolean futureWasCancelled = !future.complete(response.body());
if (futureWasCancelled) {
close(response);
}
}

@Override
public void onFailure(Call<R> call, Throwable throwable) {
public void onFailure(Call<R> _call, Throwable throwable) {
// TODO(rfink): Would be good to not leak okhttp internals here
if (throwable instanceof IoRemoteException) {
future.completeExceptionally(
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ public final class OptionalObjectToStringConverterFactory extends Converter.Fact
private OptionalObjectToStringConverterFactory() {}

@Override
public Converter<?, String> stringConverter(Type type, Annotation[] annotations, Retrofit retrofit) {
public Converter<?, String> stringConverter(Type type, Annotation[] annotations, Retrofit _retrofit) {
Optional<?> pathQueryAnnotation = ImmutableList.copyOf(annotations)
.stream()
.map(Annotation::annotationType)
Original file line number Diff line number Diff line change
@@ -399,12 +399,12 @@ public void async_retrofit_call_should_throw_RemoteException_for_server_serializ
retrofit2.Call<String> call = service.getRelative();
call.enqueue(new retrofit2.Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
public void onResponse(Call<String> _call, Response<String> _response) {
failBecauseExceptionWasNotThrown(RemoteException.class);
}

@Override
public void onFailure(Call<String> call, Throwable throwable) {
public void onFailure(Call<String> _call, Throwable throwable) {
assertThat(throwable).isInstanceOf(RemoteException.class);
assertThat(((RemoteException) throwable).getError()).isEqualTo(ERROR);
assertionsPassed.countDown(); // if you delete this countdown latch then this test will vacuously pass.
Original file line number Diff line number Diff line change
@@ -49,13 +49,13 @@ public void testConfigRefresh() throws Exception {
server1.enqueue(new MockResponse().setBody("\"server1\""));
assertThat(proxy.get().execute().body()).isEqualTo("server1");
assertThat(server1.getRequestCount()).isEqualTo(1);
assertThat(server2.getRequestCount()).isEqualTo(0);
assertThat(server2.getRequestCount()).isZero();

// Call 2
server1.enqueue(new MockResponse().setBody("\"server1\""));
assertThat(proxy.get().execute().body()).isEqualTo("server1");
assertThat(server1.getRequestCount()).isEqualTo(2);
assertThat(server2.getRequestCount()).isEqualTo(0);
assertThat(server2.getRequestCount()).isZero();

// Switch config
refreshableConfig.set(config2);
Original file line number Diff line number Diff line change
@@ -130,12 +130,12 @@ public void testQosError_performsFailover_forAsynchronousOperation(
CompletableFuture<String> future = new CompletableFuture<>();
proxy.get().enqueue(new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
public void onResponse(Call<String> _call, Response<String> response) {
future.complete(response.body());
}

@Override
public void onFailure(Call<String> call, Throwable throwable) {
public void onFailure(Call<String> _call, Throwable throwable) {
future.completeExceptionally(throwable);
}
});
@@ -215,12 +215,12 @@ public void testQosError_performsRetryWithOneNode_forAsynchronousOperation() thr
CompletableFuture<String> future = new CompletableFuture<>();
anotherProxy.get().enqueue(new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
public void onResponse(Call<String> _call, Response<String> response) {
future.complete(response.body());
}

@Override
public void onFailure(Call<String> call, Throwable throwable) {
public void onFailure(Call<String> _call, Throwable throwable) {
future.completeExceptionally(throwable);
}
});
@@ -247,12 +247,12 @@ public void testQosError_performsRetryWithOneNodeAndCache_forAsynchronousOperati
CompletableFuture<String> future = new CompletableFuture<>();
anotherProxy.get().enqueue(new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
public void onResponse(Call<String> _call, Response<String> response) {
future.complete(response.body());
}

@Override
public void onFailure(Call<String> call, Throwable throwable) {
public void onFailure(Call<String> _call, Throwable throwable) {
future.completeExceptionally(throwable);
}
});
Original file line number Diff line number Diff line change
@@ -89,13 +89,13 @@ public void testAuthenticatedProxy() throws Exception {
private static ProxySelector createProxySelector(String host, int port) {
return new ProxySelector() {
@Override
public List<Proxy> select(URI uri) {
public List<Proxy> select(URI _uri) {
InetSocketAddress addr = new InetSocketAddress(host, port);
return ImmutableList.of(new Proxy(Proxy.Type.HTTP, addr));
}

@Override
public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {}
public void connectFailed(URI _uri, SocketAddress _sa, IOException _ioe) {}
};
}
}
Original file line number Diff line number Diff line change
@@ -36,12 +36,13 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@RunWith(Parameterized.class)
public class AutoDeserializeTest {
private static final Logger log = LoggerFactory.getLogger(AutoDeserializeTest.class);
static {
LoggerFactory.getLogger(AutoDeserializeTest.class);
}

@ClassRule
public static final DropwizardAppRule<Configuration> serverUnderTestRule = new DropwizardAppRule<>(
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ public void initialize(Bootstrap<Configuration> bootstrap) {
}

@Override
public void run(Configuration configuration, Environment environment) {
public void run(Configuration _configuration, Environment environment) {
environment.jersey()
.register(
Reflection.newProxy(AutoDeserializeService.class, new EchoResourceInvocationHandler()));
@@ -59,7 +59,7 @@ public void run(Configuration configuration, Environment environment) {
*/
static class EchoResourceInvocationHandler extends AbstractInvocationHandler {
@Override
protected Object handleInvocation(Object proxy, Method method, Object[] args) {
protected Object handleInvocation(Object _proxy, Method method, Object[] args) {
Preconditions.checkArgument(args.length == 1, "Expected single argument. Method: %s", method);
return args[0];
}
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ public void testCreateTrustStoreFromEmptyDirectory() throws GeneralSecurityExcep
File certFolder = tempFolder.newFolder();
KeyStore trustStore = KeyStores.createTrustStoreFromCertificates(certFolder.toPath());

assertThat(trustStore.size()).isEqualTo(0);
assertThat(trustStore.size()).isZero();
}

@Test
@@ -75,7 +75,7 @@ public void testCreateTrustStoreFromDirectoryIgnoresHiddenFiles() throws IOExcep
Files.copy(TestConstants.CA_DER_CERT_PATH.toFile(), certFolder.toPath().resolve(".hidden_file").toFile());
KeyStore trustStore = KeyStores.createTrustStoreFromCertificates(certFolder.toPath());

assertThat(trustStore.size()).isEqualTo(0);
assertThat(trustStore.size()).isZero();
}

@Test
@@ -167,7 +167,7 @@ public void testCreateKeyStoreFromEmptyDirectory() throws GeneralSecurityExcepti
File keyFolder = tempFolder.newFolder();
KeyStore trustStore = KeyStores.createKeyStoreFromCombinedPems(keyFolder.toPath(), "changeit");

assertThat(trustStore.size()).isEqualTo(0);
assertThat(trustStore.size()).isZero();
}

@Test
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ public final class Pkcs1ReadersTests {
public void testReadPrivateKeyFailsIfNoProvidersPresent() throws IOException {
Assume.assumeFalse(ServiceLoader.load(Pkcs1Reader.class).iterator().hasNext());

assertThatThrownBy(() -> Pkcs1Readers.getInstance())
assertThatThrownBy(Pkcs1Readers::getInstance)
.isInstanceOf(IllegalStateException.class)
.hasMessageContaining("No Pkcs1Reader services were present");
}
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ public void testUpdateMetricUpdatesMeter_other() {

private void testUpdateMetricUpdatesMeter(int statusCode, Timer timer) {
assertThat(timer.getCount()).isZero();
assertThat(timer.getSnapshot().getMin()).isEqualTo(0);
assertThat(timer.getSnapshot().getMin()).isZero();

hostMetrics.record(statusCode, 1);

Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ public void testResponseMetricRegistered() throws IOException {
.build();
Timer timer = registry.timer(name);

assertThat(timer.getCount()).isEqualTo(0);
assertThat(timer.getCount()).isZero();

successfulRequest(REQUEST_A);
interceptor.intercept(chain);
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ public void canUnregister() {
String track = UUID.randomUUID().toString();
leakDetector.register(track, Optional.empty());
leakDetector.unregister(track);
track = null;

System.gc();
leakDetector.register("trigger", Optional.empty());
assertThat(leaks).isEmpty();
Original file line number Diff line number Diff line change
@@ -123,12 +123,12 @@ public void cancelCall() {
}

@Override
public void onFailure(Call unused, IOException exception) {
public void onFailure(Call _value, IOException exception) {
setException(exception);
}

@Override
public void onResponse(Call unused, Response response) {
public void onResponse(Call _value, Response response) {
set(response);
}

@@ -253,10 +253,10 @@ public void handlesSuccessfulResponseCodesWithSuccessHandler() throws Exception
CountDownLatch wasSuccessful = new CountDownLatch(1);
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException exception) {}
public void onFailure(Call _call, IOException _exception) {}

@Override
public void onResponse(Call call, Response response) throws IOException {
public void onResponse(Call _call, Response response) throws IOException {
if (response.code() == code) {
wasSuccessful.countDown();
}
@@ -275,12 +275,12 @@ public void successfulCallDoesNotInvokeFailureHandler() throws Exception {
Semaphore successHandlerExecuted = new Semaphore(0);
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException ioException) {
public void onFailure(Call _call, IOException _ioException) {
failureHandlerExecuted.release(); // should never happen
}

@Override
public void onResponse(Call call, Response response) throws IOException {
public void onResponse(Call _call, Response _response) throws IOException {
successHandlerExecuted.release();
}
});
@@ -299,12 +299,12 @@ public void unsuccessfulCallDoesNotInvokeSuccessHandler() throws Exception {
Semaphore successHandlerExecuted = new Semaphore(0);
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException ioException) {
public void onFailure(Call _call, IOException _ioException) {
failureHandlerExecuted.release();
}

@Override
public void onResponse(Call call, Response response) throws IOException {
public void onResponse(Call _call, Response _response) throws IOException {
successHandlerExecuted.release(); // should never happen
}
});
@@ -498,12 +498,12 @@ public void handlesQosExceptions_asyncCall() throws Exception {
CompletableFuture<String> future = new CompletableFuture<>();
call.enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException ioException) {
public void onFailure(Call _call, IOException ioException) {
future.completeExceptionally(ioException);
}

@Override
public void onResponse(Call call, Response response) throws IOException {
public void onResponse(Call _call, Response response) throws IOException {
future.complete(response.body().string());
}
});
@@ -639,7 +639,7 @@ public void handlesIoExceptions_obeysMaxNumRetries() throws Exception {
.hasLogMessage("Failed to complete the request due to an IOException")
.hasExactlyArgs(UnsafeArg.of("requestUrl", url2 + "/foo?bar"));

assertThat(server3.getRequestCount()).isEqualTo(0);
assertThat(server3.getRequestCount()).isZero();
}

@Test
@@ -902,12 +902,12 @@ public void non_ioexceptions_dont_break_the_world() throws IOException {

HostEventsSink throwingSink = new HostEventsSink() {
@Override
public void record(String serviceName, String hostname, int port, int statusCode, long micros) {
public void record(String _serviceName, String _hostname, int _port, int _statusCode, long _micros) {
throw new IllegalStateException("I am not an IOException");
}

@Override
public void recordIoException(String serviceName, String hostname, int port) {
public void recordIoException(String _serviceName, String _hostname, int _port) {
//empty;
}
};

0 comments on commit ec81568

Please sign in to comment.