Also use original call metadata

This commit is contained in:
murgatroid99 2019-09-30 15:56:15 -07:00
parent c7d086bfb4
commit 4e7f4dff17
2 changed files with 3 additions and 3 deletions

View File

@ -203,7 +203,7 @@ export class ChannelImplementation implements Channel {
/* If the subchannel disconnects between calling pick and getting
* the filter stack metadata, the call will end with an error. */
callStream.filterStack
.sendMetadata(Promise.resolve(new Metadata()))
.sendMetadata(Promise.resolve(callMetadata))
.then(
finalMetadata => {
if (

View File

@ -83,9 +83,9 @@ describe('Server deadlines', () => {
metadata,
{},
(error: any, response: any) => {
assert(error);
assert.strictEqual(error.code, grpc.status.DEADLINE_EXCEEDED);
assert.strictEqual(error.details, 'Deadline exceeded');
assert.strictEqual(error.message, 'Deadline exceeded');
done();
}
);
@ -108,9 +108,9 @@ describe('Server deadlines', () => {
metadata,
{},
(error: any, response: any) => {
assert(error);
assert.strictEqual(error.code, grpc.status.OUT_OF_RANGE);
assert.strictEqual(error.details, 'Invalid deadline');
assert.strictEqual(error.message, 'Invalid deadline');
done();
}
);