aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib
diff options
context:
space:
mode:
authorGravatar Carl Mastrangelo <notcarl@google.com>2018-03-08 08:02:01 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-03-08 08:03:33 -0800
commit5e00b80a63e31f755aea7e1b1dbba14f27dfed65 (patch)
tree7c35f502560d9296419194f7c5634f9ab62296df /src/test/java/com/google/devtools/build/lib
parente60b1eb93d2e3468bb49126d7076168951302e93 (diff)
update to MethodDescriptor methods instead of fields
@buchgr Closes #4790. PiperOrigin-RevId: 188332795
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib')
-rw-r--r--src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java b/src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java
index 80febbc59a..01bb2f1341 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java
@@ -468,23 +468,26 @@ public class ByteStreamUploaderTest {
ServerServiceDefinition service =
ServerServiceDefinition.builder(ByteStreamGrpc.SERVICE_NAME)
- .addMethod(ByteStreamGrpc.METHOD_WRITE,
- new ServerCallHandler<WriteRequest, WriteResponse>() {
- @Override
- public Listener<WriteRequest> startCall(ServerCall<WriteRequest, WriteResponse> call,
- Metadata headers) {
- // Don't request() any messages from the client, so that the client will be blocked
- // on flow control and thus the call will sit there idle long enough to receive the
- // cancellation.
- return new Listener<WriteRequest>() {
+ .addMethod(
+ ByteStreamGrpc.getWriteMethod(),
+ new ServerCallHandler<WriteRequest, WriteResponse>() {
@Override
- public void onCancel() {
- cancellations.countDown();
+ public Listener<WriteRequest> startCall(
+ ServerCall<WriteRequest, WriteResponse> call, Metadata headers) {
+ // Don't request() any messages from the client, so that the client will be
+ // blocked
+ // on flow control and thus the call will sit there idle long enough to receive
+ // the
+ // cancellation.
+ return new Listener<WriteRequest>() {
+ @Override
+ public void onCancel() {
+ cancellations.countDown();
+ }
+ };
}
- };
- }
- })
- .build();
+ })
+ .build();
serviceRegistry.addService(service);