diff options
author | 2015-05-08 16:38:32 -0700 | |
---|---|---|
committer | 2015-05-08 16:38:32 -0700 | |
commit | 0b488f7649065ad6f00cabbbb617a05dfc7a92e3 (patch) | |
tree | 7a9381245a9913b6123910a531a0d1a20a463a14 /src/node/test/surface_test.js | |
parent | 2be6095c10353fbcdfbdec50e269775c1a42641d (diff) | |
parent | b8b59b18f2585b602a8c4282ebaf4d5c8bef473a (diff) |
Merge github.com:grpc/grpc into churn-churn-churn-the-api-gently-down-the-stream
Conflicts:
test/cpp/end2end/async_end2end_test.cc
Diffstat (limited to 'src/node/test/surface_test.js')
-rw-r--r-- | src/node/test/surface_test.js | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js index 6f63f1044f..38f9028bff 100644 --- a/src/node/test/surface_test.js +++ b/src/node/test/surface_test.js @@ -278,9 +278,8 @@ describe('Trailing metadata', function() { it('should be present when a server stream call fails', function(done) { var call = client.serverStream({error: true}); call.on('data', function(){}); - call.on('status', function(status) { - assert.notStrictEqual(status.code, grpc.status.OK); - assert.deepEqual(status.metadata.metadata, ['yes']); + call.on('error', function(error) { + assert.deepEqual(error.metadata.metadata, ['yes']); done(); }); }); @@ -302,9 +301,8 @@ describe('Trailing metadata', function() { call.write({error: true}); call.end(); call.on('data', function(){}); - call.on('status', function(status) { - assert.notStrictEqual(status.code, grpc.status.OK); - assert.deepEqual(status.metadata.metadata, ['yes']); + call.on('error', function(error) { + assert.deepEqual(error.metadata.metadata, ['yes']); done(); }); }); @@ -345,16 +343,16 @@ describe('Cancelling surface client', function() { }); it('Should correctly cancel a server stream call', function(done) { var call = client.fib({'limit': 5}); - call.on('status', function(status) { - assert.strictEqual(status.code, surface_client.status.CANCELLED); + call.on('error', function(error) { + assert.strictEqual(error.code, surface_client.status.CANCELLED); done(); }); call.cancel(); }); it('Should correctly cancel a bidi stream call', function(done) { var call = client.divMany(); - call.on('status', function(status) { - assert.strictEqual(status.code, surface_client.status.CANCELLED); + call.on('error', function(error) { + assert.strictEqual(error.code, surface_client.status.CANCELLED); done(); }); call.cancel(); |