-
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
...vanced-reactive/src/main/java/io/quarkus/ts/http/advanced/reactive/GreetingInterface.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.quarkus.ts.http.advanced.reactive; | ||
|
||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Path; | ||
|
||
public interface GreetingInterface { | ||
|
||
@GET | ||
@Path("/interface-greeting") | ||
String interfaceGreeting(); | ||
} |
20 changes: 20 additions & 0 deletions
20
...ive/src/main/java/io/quarkus/ts/http/advanced/reactive/GreetingOptionAndHeadResource.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.quarkus.ts.http.advanced.reactive; | ||
|
||
import jakarta.enterprise.inject.spi.CDI; | ||
import jakarta.ws.rs.Path; | ||
|
||
@Path("/greeting") | ||
public class GreetingOptionAndHeadResource implements GreetingInterface { | ||
|
||
@Path("/cdi-sub-resource") | ||
public GreetingSubResources helloFromSubResource() { | ||
return CDI.current() | ||
.select(GreetingSubResources.class) | ||
.get(); | ||
} | ||
|
||
@Override | ||
public String interfaceGreeting() { | ||
return "Greeting from interface"; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...ced-reactive/src/main/java/io/quarkus/ts/http/advanced/reactive/GreetingSubResources.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.quarkus.ts.http.advanced.reactive; | ||
|
||
import jakarta.enterprise.context.RequestScoped; | ||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.POST; | ||
|
||
@RequestScoped | ||
public class GreetingSubResources { | ||
|
||
@GET | ||
public String get() { | ||
return "Greeting from sub-resource using GET"; | ||
} | ||
|
||
@POST | ||
public String post() { | ||
return "Greeting from sub-resource using POST"; | ||
} | ||
|
||
} |
This file contains 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
Oops, something went wrong.
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.
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
andoptionAndHeadRequestUsingAbstractResourceWithPath
tagged withhttps://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.
There are more like to ensure that endpoint work. The quarkus fix was to add
HEAD
andOPTION
. At least this is my logic behind adding the tag here.@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