diff options
author | murgatroid99 <mlumish@google.com> | 2016-03-21 15:50:39 -0700 |
---|---|---|
committer | murgatroid99 <mlumish@google.com> | 2016-03-21 15:50:39 -0700 |
commit | 9a0c74116f40a867ca08c6a65ae488b9aec2704b (patch) | |
tree | aae288d5bcfafdc2acac0e23146a6aed5a531eb2 /src/node/interop | |
parent | b08ee7a260d0f274554892cd3138215ab905ce77 (diff) |
Follow Node's callback-last convention for client calls
Diffstat (limited to 'src/node/interop')
-rw-r--r-- | src/node/interop/interop_client.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index 5602011a8e..ac0eddcf45 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -286,7 +286,7 @@ function cancelAfterFirstResponse(client, done) { function timeoutOnSleepingServer(client, done) { var deadline = new Date(); deadline.setMilliseconds(deadline.getMilliseconds() + 1); - var call = client.fullDuplexCall(null, {deadline: deadline}); + var call = client.fullDuplexCall({deadline: deadline}); call.write({ payload: {body: zeroBuffer(27182)} }); @@ -316,10 +316,10 @@ function customMetadata(client, done) { body: zeroBuffer(271828) } }; - var unary = client.unaryCall(arg, function(err, resp) { + var unary = client.unaryCall(arg, metadata, function(err, resp) { assert.ifError(err); done(); - }, metadata); + }); unary.on('metadata', function(metadata) { assert.deepEqual(metadata.get(ECHO_INITIAL_KEY), ['test_initial_metadata_value']); @@ -455,14 +455,14 @@ function perRpcAuthTest(client, done, extra) { credential = credential.createScoped(scope); } var creds = grpc.credentials.createFromGoogleCredential(credential); - client.unaryCall(arg, function(err, resp) { + client.unaryCall(arg, {credentials: creds}, function(err, resp) { assert.ifError(err); assert.strictEqual(resp.username, SERVICE_ACCOUNT_EMAIL); assert(extra.oauth_scope.indexOf(resp.oauth_scope) > -1); if (done) { done(); } - }, null, {credentials: creds}); + }); }); } |