Skip to content

Commit

Permalink
test: emit empty metadata before emitting unspecified error (#1801)
Browse files Browse the repository at this point in the history
* test: emit empty metadata before emitting unspecified error

* test: bump typescript version in fixtures
  • Loading branch information
alexander-fenster authored Feb 10, 2023
1 parent a1b1ef2 commit 14ef031
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion system-test/fixtures/sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"devDependencies": {
"@types/node": "^18.0.0",
"typescript": "^3.0.0",
"typescript": "^4.0.0",
"gts": "^3.0.0"
}
}
2 changes: 2 additions & 0 deletions test/mockserver/mockspanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ export class MockSpanner {
call.write(MockSpanner.toPartialResultSet(res.updateCount));
break;
case StatementResultType.ERROR:
call.sendMetadata(new Metadata());
call.emit('error', res.error);
break;
default:
Expand All @@ -633,6 +634,7 @@ export class MockSpanner {
call.end();
})
.catch(err => {
call.sendMetadata(new Metadata());
call.emit('error', err);
call.end();
});
Expand Down

0 comments on commit 14ef031

Please sign in to comment.