Skip to content

Commit 04ef833

Browse files
committed
test(gax): assert exception and server.address attributes on streaming attempt logs
1 parent c104d04 commit 04ef833

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎core/packages/gax/test/unit/apiCallable.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2314,12 +2314,21 @@ describe('createApiCall', () => {
23142314
attemptOther['rpc.response.status_code'],
23152315
'UNAVAILABLE',
23162316
);
2317-
assert.strictEqual('exception.type' in attemptOther, false);
2317+
assert.strictEqual(
2318+
attemptOther['server.address'],
2319+
'example.googleapis.com',
2320+
);
2321+
assert.strictEqual(attemptOther['exception.type'], 'GoogleError');
2322+
assert.strictEqual(
2323+
attemptOther['exception.message'],
2324+
'streaming test failure',
2325+
);
23182326
assert.strictEqual(
23192327
callOther['rpc.method'],
23202328
'google.example.v1.Echo/Echo',
23212329
);
23222330
assert.strictEqual(callOther['rpc.response.status_code'], 'UNAVAILABLE');
2331+
assert.strictEqual(callOther['server.address'], 'example.googleapis.com');
23232332
assert.strictEqual(callOther['exception.type'], 'GoogleError');
23242333
assert.strictEqual(
23252334
callOther['exception.message'],

0 commit comments

Comments
 (0)