Skip to content
Snippets Groups Projects
Commit 54b8f0f3 authored by murgatroid99's avatar murgatroid99
Browse files

Eliminated some redundant checks in the Node interop client

parent 2ad0fc77
No related branches found
No related tags found
No related merge requests found
...@@ -69,9 +69,6 @@ function zeroBuffer(size) { ...@@ -69,9 +69,6 @@ function zeroBuffer(size) {
function emptyUnary(client, done) { function emptyUnary(client, done) {
var call = client.emptyCall({}, function(err, resp) { var call = client.emptyCall({}, function(err, resp) {
assert.ifError(err); assert.ifError(err);
});
call.on('status', function(status) {
assert.strictEqual(status.code, grpc.status.OK);
if (done) { if (done) {
done(); done();
} }
...@@ -96,9 +93,6 @@ function largeUnary(client, done) { ...@@ -96,9 +93,6 @@ function largeUnary(client, done) {
assert.ifError(err); assert.ifError(err);
assert.strictEqual(resp.payload.type, 'COMPRESSABLE'); assert.strictEqual(resp.payload.type, 'COMPRESSABLE');
assert.strictEqual(resp.payload.body.length, 314159); assert.strictEqual(resp.payload.body.length, 314159);
});
call.on('status', function(status) {
assert.strictEqual(status.code, grpc.status.OK);
if (done) { if (done) {
done(); done();
} }
...@@ -115,9 +109,6 @@ function clientStreaming(client, done) { ...@@ -115,9 +109,6 @@ function clientStreaming(client, done) {
var call = client.streamingInputCall(function(err, resp) { var call = client.streamingInputCall(function(err, resp) {
assert.ifError(err); assert.ifError(err);
assert.strictEqual(resp.aggregated_payload_size, 74922); assert.strictEqual(resp.aggregated_payload_size, 74922);
});
call.on('status', function(status) {
assert.strictEqual(status.code, grpc.status.OK);
if (done) { if (done) {
done(); done();
} }
...@@ -308,9 +299,6 @@ function authTest(expected_user, scope, client, done) { ...@@ -308,9 +299,6 @@ function authTest(expected_user, scope, client, done) {
assert.strictEqual(resp.payload.body.length, 314159); assert.strictEqual(resp.payload.body.length, 314159);
assert.strictEqual(resp.username, expected_user); assert.strictEqual(resp.username, expected_user);
assert.strictEqual(resp.oauth_scope, AUTH_SCOPE_RESPONSE); assert.strictEqual(resp.oauth_scope, AUTH_SCOPE_RESPONSE);
});
call.on('status', function(status) {
assert.strictEqual(status.code, grpc.status.OK);
if (done) { if (done) {
done(); done();
} }
...@@ -344,9 +332,6 @@ function oauth2Test(expected_user, scope, per_rpc, client, done) { ...@@ -344,9 +332,6 @@ function oauth2Test(expected_user, scope, per_rpc, client, done) {
assert.ifError(err); assert.ifError(err);
assert.strictEqual(resp.username, expected_user); assert.strictEqual(resp.username, expected_user);
assert.strictEqual(resp.oauth_scope, AUTH_SCOPE_RESPONSE); assert.strictEqual(resp.oauth_scope, AUTH_SCOPE_RESPONSE);
});
call.on('status', function(status) {
assert.strictEqual(status.code, grpc.status.OK);
if (done) { if (done) {
done(); done();
} }
...@@ -358,7 +343,6 @@ function oauth2Test(expected_user, scope, per_rpc, client, done) { ...@@ -358,7 +343,6 @@ function oauth2Test(expected_user, scope, per_rpc, client, done) {
client.updateMetadata = updateMetadata; client.updateMetadata = updateMetadata;
makeTestCall(null, {}); makeTestCall(null, {});
} }
}); });
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment