Skip to content
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

[4.x] - Add @RequestScoped support for testing #7916

Merged
merged 29 commits into from
Dec 7, 2023

Conversation

dalexandrov
Copy link
Contributor

Resolves #7564 for 4.x

Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
@dalexandrov dalexandrov added testing 4.x Version 4.x labels Oct 30, 2023
@dalexandrov dalexandrov self-assigned this Oct 30, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 30, 2023
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
@dalexandrov dalexandrov requested review from danielkec and removed request for tomas-langer October 31, 2023 08:55
@dalexandrov dalexandrov marked this pull request as ready for review October 31, 2023 08:55
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
@dalexandrov dalexandrov changed the title [4.x] - Add @RequestScoped support for testing [3.x] - Add @RequestScoped support for testing Nov 20, 2023
@dalexandrov dalexandrov reopened this Nov 20, 2023
@dalexandrov dalexandrov changed the title [3.x] - Add @RequestScoped support for testing [4.x] - Add @RequestScoped support for testing Nov 20, 2023
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
@trentjeff
Copy link
Member

Would like to see this backported to 2.x

@dalexandrov
Copy link
Contributor Author

Would like to see this backported to 2.x

In progress

Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
@barchetta barchetta added this to the 4.0.2 milestone Nov 22, 2023
dalexandrov and others added 8 commits November 29, 2023 11:10
…ile/testing/common/TestValidator.java

Co-authored-by: Daniel Kec <daniel.kec@oracle.com>
…roprofile/tests/testing/testng/TestReqScopeDisabledDiscovery.java

Co-authored-by: Daniel Kec <daniel.kec@oracle.com>
Co-authored-by: Daniel Kec <daniel.kec@oracle.com>
…ile/testing/testng/HelidonTestNgListener.java

Co-authored-by: Daniel Kec <daniel.kec@oracle.com>
Co-authored-by: Daniel Kec <daniel.kec@oracle.com>
…ile/testing/testng/HelidonTestNgListener.java

Co-authored-by: Daniel Kec <daniel.kec@oracle.com>
…ile/testing/testng/HelidonTestNgListener.java

Co-authored-by: Daniel Kec <daniel.kec@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Copy link
Member

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering we always add the dependency, there is no service loader to load extensions, and that we want to keep this bacwkard compatible, I do not think this design is what we want.
The simplest solution here would be to just add the @AddJaxRs annotation directly to the list of annotation in the existing testing module (so we do not introduce a set of new Common annotations.
As long as we keept the dependency on MP Server optional, this should be sufficient.

</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces a provided dependency on MP Server to MP testing.
The extension was written in a way that there is no dependency on MP server (e.g. it can be used to test just CDI without Server).
I am not sure this is the right solution.

@dalexandrov
Copy link
Contributor Author

Considering we always add the dependency, there is no service loader to load extensions, and that we want to keep this bacwkard compatible, I do not think this design is what we want. The simplest solution here would be to just add the @AddJaxRs annotation directly to the list of annotation in the existing testing module (so we do not introduce a set of new Common annotations. As long as we keept the dependency on MP Server optional, this should be sufficient.

This was my first version of the PR :)

Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
@dalexandrov dalexandrov requested a review from danielkec December 6, 2023 17:25
@dalexandrov dalexandrov merged commit df64dfa into helidon-io:main Dec 7, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x OCA Verified All contributors have signed the Oracle Contributor Agreement. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@HelidonTest request scope support without discovery
5 participants