Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/common/src/grpc-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ GrpcService.prototype.requestStream = function(protoOpts, reqOpts) {
// https://github.com/GoogleCloudPlatform/google-cloud-node/pull/1444#discussion_r71812636
var grcpStatus = GrpcService.decorateStatus_({ code: 0 });

this.emit('response', grcpStatus);
stream.emit('response', grcpStatus);
});
}
};
Expand Down
4 changes: 1 addition & 3 deletions packages/common/test/grpc-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -1178,14 +1178,12 @@ describe('GrpcService', function() {
return options.request();
};

fakeStream
.on('error', done)
grpcService.requestStream(PROTO_OPTS, REQ_OPTS)
.on('response', function(resp) {
assert.deepEqual(resp, GrpcService.GRPC_ERROR_CODE_TO_HTTP[0]);
done();
});

grpcService.requestStream(PROTO_OPTS, REQ_OPTS);
fakeStream.emit('metadata');
});

Expand Down