|
|
|
@ -286,6 +286,11 @@ describe('end-to-end', function() { |
|
|
|
|
assert.ifError(err); |
|
|
|
|
assert(response['send metadata']); |
|
|
|
|
assert.strictEqual(response.read.toString(), requests[0]); |
|
|
|
|
var snd_batch = {}; |
|
|
|
|
snd_batch[grpc.opType.RECV_MESSAGE] = true; |
|
|
|
|
server_call.startBatch(snd_batch, function(err, response) { |
|
|
|
|
assert.ifError(err); |
|
|
|
|
assert.strictEqual(response.read.toString(), requests[1]); |
|
|
|
|
var end_batch = {}; |
|
|
|
|
end_batch[grpc.opType.RECV_CLOSE_ON_SERVER] = true; |
|
|
|
|
end_batch[grpc.opType.SEND_STATUS_FROM_SERVER] = { |
|
|
|
@ -293,15 +298,14 @@ describe('end-to-end', function() { |
|
|
|
|
'code': grpc.status.OK, |
|
|
|
|
'details': status_text |
|
|
|
|
}; |
|
|
|
|
end_batch[grpc.opType.RECV_MESSAGE] = true; |
|
|
|
|
server_call.startBatch(end_batch, function(err, response) { |
|
|
|
|
assert.ifError(err); |
|
|
|
|
assert(response['send status']); |
|
|
|
|
assert(!response.cancelled); |
|
|
|
|
assert.strictEqual(response.read.toString(), requests[1]); |
|
|
|
|
done(); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|