diff options
author | 2016-01-27 08:13:33 +0000 | |
---|---|---|
committer | 2016-01-27 08:13:33 +0000 | |
commit | cde1ee1440c72fc50607bb22421e283dd145e6b6 (patch) | |
tree | fafd2c4d95e9a1db2ff47538d7a600d3d87eebc4 /src/node/test/surface_test.js | |
parent | 338576096f951821e9610525a25235152fcf9011 (diff) | |
parent | 4f3840dc06676df5eed09b58828393fe85a599c2 (diff) |
Merge github.com:grpc/grpc into twah
Diffstat (limited to 'src/node/test/surface_test.js')
-rw-r--r-- | src/node/test/surface_test.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js index fc765ed731..c65d95f767 100644 --- a/src/node/test/surface_test.js +++ b/src/node/test/surface_test.js @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -952,6 +952,7 @@ describe('Call propagation', function() { describe('Cancellation', function() { it('With a unary call', function(done) { done = multiDone(done, 2); + var call; proxy_impl.unary = function(parent, callback) { client.unary(parent.request, function(err, value) { try { @@ -969,12 +970,13 @@ describe('Call propagation', function() { proxy.start(); var proxy_client = new Client('localhost:' + proxy_port, grpc.credentials.createInsecure()); - var call = proxy_client.unary({}, function(err, value) { + call = proxy_client.unary({}, function(err, value) { done(); }); }); it('With a client stream call', function(done) { done = multiDone(done, 2); + var call; proxy_impl.clientStream = function(parent, callback) { client.clientStream(function(err, value) { try { @@ -992,12 +994,13 @@ describe('Call propagation', function() { proxy.start(); var proxy_client = new Client('localhost:' + proxy_port, grpc.credentials.createInsecure()); - var call = proxy_client.clientStream(function(err, value) { + call = proxy_client.clientStream(function(err, value) { done(); }); }); it('With a server stream call', function(done) { done = multiDone(done, 2); + var call; proxy_impl.serverStream = function(parent) { var child = client.serverStream(parent.request, null, {parent: parent}); @@ -1013,13 +1016,14 @@ describe('Call propagation', function() { proxy.start(); var proxy_client = new Client('localhost:' + proxy_port, grpc.credentials.createInsecure()); - var call = proxy_client.serverStream({}); + call = proxy_client.serverStream({}); call.on('error', function(err) { done(); }); }); it('With a bidi stream call', function(done) { done = multiDone(done, 2); + var call; proxy_impl.bidiStream = function(parent) { var child = client.bidiStream(null, {parent: parent}); child.on('error', function(err) { @@ -1034,7 +1038,7 @@ describe('Call propagation', function() { proxy.start(); var proxy_client = new Client('localhost:' + proxy_port, grpc.credentials.createInsecure()); - var call = proxy_client.bidiStream(); + call = proxy_client.bidiStream(); call.on('error', function(err) { done(); }); |