-
Notifications
You must be signed in to change notification settings - Fork 1k
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
HTTP server instrumentation TCK #3379
Conversation
dda2ffe
to
176ecad
Compare
} | ||
|
||
@GET | ||
@Path("hello/{name}") |
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.
I wonder if these strings can't be static finals in the test abstract class. That way you will be sure that you're using the proper strings. WDYT?
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.
I agree it would be good to have some way to avoid typos and improve discoverability beyond the current setup of it being in the JavaDoc. I'm wondering if an enum might make it easy for implementors to find all the routes that should be implemented. I'm going to draft something and see if I can get some feedback on 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.
Ah, I tried making the enum and immediately realized that won't work for using here because the annotation needs a constant value, and the compiler doesn't recognize enum fields/methods as constant, even though they effectively are in this case.
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.
See newly added InstrumentedRoutes
class with string constants. WDYT?
Similar to the http client instrumentation tests, these tests are meant for http server instrumentation to ensure they include the expected tags in a minimal set of scenarios that should be supported.
176ecad
to
19437d3
Compare
Similar to the http client instrumentation tests, these tests are meant for http server instrumentation to ensure they include the expected tags in a minimal set of scenarios that should be supported.
Pure Jetty servlet instrumentation does not even tag
uri
since getting a templated URI is not generically possible at that level. Therefore the tests are disabled for Jetty server instrumentation.There are probably more scenarios we should test in all instrumentations. Please let me know more to add. Improvements to the usability/API are also welcome.