-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add coverage for Quarkus #43422 #2186
Conversation
run tests |
Native is related will look at it |
...p-advanced-reactive/src/main/java/io/quarkus/ts/http/advanced/reactive/GreetingResource.java
Outdated
Show resolved
Hide resolved
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.
code LGTM thanks, but I'll wait for the native fixes updated and changes requested.
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.
OPTIONS
is not covered- what about other HTTP methods and sub-resource use case?
- test failures need investigation
2e9e1de
to
1fb23ed
Compare
Native issue was caused by this quarkusio/quarkus#42976 so I create different resource class where I tested it + testing it with interface. Added |
run tests |
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 @jedla97 the tests look good to me and now are covering all topics mentioned.
I have two small suggestions:
- Could you consider creating a reusable helper method since most of tests have similar structure body?
- On the other hand, I am wondering if it would be good having some negative test that returns for instance a 405 status code where be appropiated.
This is cover age for quarkusio/quarkus#43440
1fb23ed
to
a5bef9d
Compare
@jcarranzan I created the methods for HEAD and OPTION requests. With that I combined them into one test.
Tbh I don't see much added value in these negative tests. Also what should be testing? Not able to send |
run tests |
Ok thanks, let's wait for the checks. |
@Test | ||
@Tag("https://github.com/quarkusio/quarkus/issues/43422") | ||
@DisplayName("Test Quarkus REST using CDI getting the sub-resource for OPTION and HEAD request") | ||
void cdiSubResourceOptionAndHeadRequest() { |
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.
This is only method that fails with 3.15.1 in JVM mode. Why are other tests optionAndHeadRequestUsingInterfaceResourceWithPath
and optionAndHeadRequestUsingAbstractResourceWithPath
tagged with https://github.com/quarkusio/quarkus/issues/43422
if they are passing with 3.15.1 in JVM mode?
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 added the tag there as this issue was main motivation to create that coverage. If you things tha tag shouldn't be there. I can create PR for its removal.
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.
Clear answer :-D :
I don't really care, keep it as it. I just thought that if you tag something with an issue, it means that issue is tested by this. It can still be true that changed code is not failing but testing changes because it can test code that we didn't have covered previously. What I do when I verify bug tickets is that I look for tests tagged with that issue. Now I'll keep in mind that failing test tagged with an issue may not mean that issue is not fixed. It probably won't happen anyway.
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.
Also, why are other 3 tests added in this PR without this tag, is that because they were not added because of this issue or you just forgot?
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.
Goodcatch @michalvavrik. @jedla97 can you prepare a followup PR with backport label?
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.
Also, why are other 3 tests added in this PR without this tag, is that because they were not added because of this issue or you just forgot?
There are more like to ensure that endpoint work. The quarkus fix was to add HEAD
and OPTION
. At least this is my logic behind adding the tag here.
@jedla97 can you prepare a followup PR with backport label?
@rsvoboda with adding or removing the tags?
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 think this kinda depends on how other QE members use @Tag
, I always thought that it signals that some test tests the issue/ticket. But maybe that was just me.
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.
@Tag
usage ... there is no rule really, some members started to use it, but we didn't have any discussion and conclusion on its usage.
I would personally use @Tag
only on tests testing the bug. I wouldn't tag the other related tests.
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.
Alright, thanks
@jedla97 I think we should try to have PR titled with a text that describes what PR does, you checked https://cbea.ms/git-commit/, |
Summary
Adding coverage for quarkusio/quarkus#43422 issue.
The PR to fix the original issue is quarkusio/quarkus#43440
Please select the relevant options.
run tests
phrase in comment)Checklist: