test: Add a logger to print the instance id.#1129
test: Add a logger to print the instance id.#1129danieljbruce merged 4 commits intogoogleapis:mainfrom
Conversation
|
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
kolea2
left a comment
There was a problem hiding this comment.
please rename PR to "test: ..." prefix
| }, | ||
| }); | ||
| console.log(`Test Instance Id: ${instanceId}`); | ||
| await operation.promise(); |
There was a problem hiding this comment.
Can we log the cluster we query in checkMetadata (e.g. method starting line 40)?
There was a problem hiding this comment.
Sure. We can log the cluster id.
| @@ -67,6 +67,7 @@ describe('Cluster', () => { | |||
| time_created: Date.now(), | |||
| }, | |||
| }); | |||
There was a problem hiding this comment.
Is it also possible to add more IDs on the cluster that is being compared in the assertion? i.e. to easily show which cluster is mismatching the ID
1) Cluster << would be nice to have the cluster ID here >>
Update cluster
Starting from autoscaling
should change cluster to manual scaling:
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
3 !== 5
+ expected - actual
-3
+5
at checkMetadata (build/system-test/cluster.js:31:16)
-> /workspace/system-test/cluster.ts:42:12
at async Context.<anonymous> (build/system-test/cluster.js:273:17)
-> /workspace/system-test/cluster.ts:306:9
There was a problem hiding this comment.
Hmm. I'm not sure how to make a dynamic title in the mocha framework, but we can definitely print out the cluster id.
There was a problem hiding this comment.
No worries, yea, whatever is easier to do, as I'm not too familiar w/ Typescript and its frameworks. So long as we see the cluster ID logged earlier in the log that corresponds w/ the test failure, we should be alright
This PR is used to help with debugging cluster issues.
Fixes #1128