-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spanner: add oc tests for session pool metrics. #2416
Conversation
@olavloite Thanks for reviewing this CL on Gerrit. I have moved it here and will fix all your comments. |
Done.
No, I don't think so because it needs to register views a global
I may copy this from an existing test somewhere. I have deleted it. |
row := stat.Rows[0] | ||
m := getTagMap(row.Tags) | ||
checkCommonTags(t, m) | ||
if got, want := fmt.Sprintf("%v", row.Data), "&{1}"; got != want { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it is highly likely that this is true, I'm a little bit afraid that this check might turn out to be flaky. The test uses a context with a timeout of 1ms, which means that it is highly likely to timeout, but there is no real guarantee that it will happen while waiting for a session. I think that adding a simulated execution time of 2ms for the BatchCreateSessions
on the mock server would guarantee it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. Done.
@@ -3,7 +3,7 @@ module cloud.google.com/go/spanner | |||
go 1.11 | |||
|
|||
require ( | |||
cloud.google.com/go v0.57.0 | |||
cloud.google.com/go v0.58.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I made some changes in https://github.com/googleapis/google-cloud-go/blob/master/internal/testutil/trace.go, which are included in v.0.58.0.
48920cb
to
66b9cc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once the merge conflicts are solved.
The tests verify the correctness of outputting session-pool metrics. Change-Id: I97aba7a9457078f0fdf5e8a542fe6095451dab95
66b9cc6
to
0e1160a
Compare
The tests verify the correctness of outputting session-pool metrics.