retry(test): improve user agent strings to provide more information while debugging#1121
Merged
BenWhitehead merged 2 commits intogoogleapis:mainfrom Oct 25, 2021
BenWhitehead:per-test-ua
Merged
retry(test): improve user agent strings to provide more information while debugging#1121BenWhitehead merged 2 commits intogoogleapis:mainfrom BenWhitehead:per-test-ua
BenWhitehead merged 2 commits intogoogleapis:mainfrom
BenWhitehead:per-test-ua
Conversation
…hile debugging When debugging and looking at access logs it is useful to be able to identify individual test cases and test bench operations simply by the user agent string. This change adds test names to operations related to each test, and annotates calls for testbench as such.
frankyn
suggested changes
Oct 25, 2021
|
|
||
| private String fmtUserAgent(String testDescriptor) { | ||
| return String.format( | ||
| "%s/ (%s) java-conformance-tests/", testDescriptor, testRetryConformance.getTestName()); |
Contributor
There was a problem hiding this comment.
why do you have spacing and trailing /?
Collaborator
Author
There was a problem hiding this comment.
An individual user-agent entry is of the form {product}/[{version}] [({comment})]. For both entries, we're not including a version as there isn't a useful value to include so we have what looks like a dangling /.
For the test descriptor and test name this adds the test name into the comment, since the test name has a / in it we want to ensure we're in the comment so we don't accidentally look like we're defining a new entry.
tritone
approved these changes
Oct 25, 2021
frankyn
approved these changes
Oct 25, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When debugging and looking at access logs it is useful to be able to identify individual test cases and test bench operations simply by the user agent string. This change adds test names to operations related to each test, and annotates calls for testbench as such.