mirror of https://github.com/grpc/grpc-java.git
core: add DoNotMock annotations
This commit is contained in:
parent
7909abf065
commit
26a08cd75e
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ description = 'gRPC: Core'
|
|||
|
||||
dependencies {
|
||||
compile libraries.guava,
|
||||
libraries.errorprone,
|
||||
libraries.jsr305
|
||||
testCompile project(':grpc-testing')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 <ReqT> type of message sent one or more times to the server.
|
||||
* @param <RespT> type of message received one or more times from the server.
|
||||
*/
|
||||
@DoNotMock("Use InProcessTransport and make a fake server instead")
|
||||
public abstract class ClientCall<ReqT, RespT> {
|
||||
/**
|
||||
* Callbacks for receiving metadata, response messages and completion status from the server.
|
||||
|
|
|
|||
|
|
@ -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 <ReqT> parsed type of request message.
|
||||
* @param <RespT> parsed type of response message.
|
||||
*/
|
||||
@DoNotMock("Use InProcessTransport and make a fake server instead")
|
||||
public abstract class ServerCall<ReqT, RespT> {
|
||||
/**
|
||||
* {@link Attributes.Key} for the remote address of server call attributes
|
||||
|
|
|
|||
Loading…
Reference in New Issue