Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 98c1064

Browse files
authored
test: Add comments to the setup hook for the client side metrics tests (#1667)
## Description This change is a follow-up to https://togithub.com/googleapis/nodejs-bigtable/pull/1662/files where we discussed maybe a comment would be helpful for this test. ## Impact Better test readability ## Testing Just comments added
1 parent 96533f3 commit 98c1064

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

system-test/client-side-metrics-all-methods.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,18 @@ describe('Bigtable/ClientSideMetricsAllMethods', () => {
357357
let defaultProjectId: string;
358358

359359
before(async () => {
360+
/*
361+
For both the default project and the secondary project we need to create
362+
instances with some data in them so that the tests can collect all the
363+
metrics they would normally collect in a typical situation and compare
364+
those metrics against expected results.
365+
366+
We need tests like "should send the metrics to Google Cloud Monitoring for a
367+
ReadRows call with a second project" that work with a second project because
368+
we want to ensure that when a user specifies a second project that the
369+
metrics actually get written for that other project instead of the default
370+
project.
371+
*/
360372
for (const bigtable of [
361373
new Bigtable(),
362374
new Bigtable({projectId: SECOND_PROJECT_ID}),

system-test/client-side-metrics.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,18 @@ describe('Bigtable/ClientSideMetrics', () => {
334334
let defaultProjectId: string;
335335

336336
before(async () => {
337+
/*
338+
For both the default project and the secondary project we need to create
339+
instances with some data in them so that the tests can collect all the
340+
metrics they would normally collect in a typical situation and compare
341+
those metrics against expected results.
342+
343+
We need tests like "should send the metrics to Google Cloud Monitoring for a
344+
ReadRows call with a second project" that work with a second project because
345+
we want to ensure that when a user specifies a second project that the
346+
metrics actually get written for that other project instead of the default
347+
project.
348+
*/
337349
for (const bigtable of [
338350
new Bigtable(),
339351
new Bigtable({projectId: SECOND_PROJECT_ID}),

0 commit comments

Comments
 (0)