diff --git a/build.gradle b/build.gradle index 58be5c9398..badb1c8d39 100644 --- a/build.gradle +++ b/build.gradle @@ -143,6 +143,7 @@ subprojects { epoll_suffix = ":" + osdetector.classifier } libraries = [ + errorprone: "com.google.errorprone:error_prone_annotations:2.0.11", guava: "com.google.guava:guava:${guavaVersion}", hpack: 'com.twitter:hpack:0.10.1', jsr305: 'com.google.code.findbugs:jsr305:3.0.0', diff --git a/core/build.gradle b/core/build.gradle index f7ccc82a75..b03e06c9de 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -6,6 +6,7 @@ description = 'gRPC: Core' dependencies { compile libraries.guava, + libraries.errorprone, libraries.jsr305 testCompile project(':grpc-testing') } diff --git a/core/src/main/java/io/grpc/ClientCall.java b/core/src/main/java/io/grpc/ClientCall.java index b3cac983e6..b253326e6c 100644 --- a/core/src/main/java/io/grpc/ClientCall.java +++ b/core/src/main/java/io/grpc/ClientCall.java @@ -31,6 +31,8 @@ package io.grpc; +import com.google.errorprone.annotations.DoNotMock; + import javax.annotation.Nullable; /** @@ -111,6 +113,7 @@ import javax.annotation.Nullable; * @param type of message sent one or more times to the server. * @param type of message received one or more times from the server. */ +@DoNotMock("Use InProcessTransport and make a fake server instead") public abstract class ClientCall { /** * Callbacks for receiving metadata, response messages and completion status from the server. diff --git a/core/src/main/java/io/grpc/ServerCall.java b/core/src/main/java/io/grpc/ServerCall.java index 37977f365c..488438025f 100644 --- a/core/src/main/java/io/grpc/ServerCall.java +++ b/core/src/main/java/io/grpc/ServerCall.java @@ -31,6 +31,8 @@ package io.grpc; +import com.google.errorprone.annotations.DoNotMock; + import java.net.SocketAddress; import javax.net.ssl.SSLSession; @@ -52,6 +54,7 @@ import javax.net.ssl.SSLSession; * @param parsed type of request message. * @param parsed type of response message. */ +@DoNotMock("Use InProcessTransport and make a fake server instead") public abstract class ServerCall { /** * {@link Attributes.Key} for the remote address of server call attributes