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

Introduce support for processing test contexts ahead-of-time #32108

Closed
4 tasks done
snicoll opened this issue Aug 18, 2022 · 2 comments
Closed
4 tasks done

Introduce support for processing test contexts ahead-of-time #32108

snicoll opened this issue Aug 18, 2022 · 2 comments
Assignees
Labels
status: superseded An issue that has been superseded by another

Comments

@snicoll
Copy link
Member

snicoll commented Aug 18, 2022

NBT allows to invoke an existing test suite in a native image. For that to work, we need to process each test context ahead-of-time and make sure that the optimized version is available in the classpath that NBT uses.

The underlying feature is being implemented in the core framework. See spring-projects/spring-framework#28825 which should provide a main class to invoke similar to our AotProcessor.

Things to consider:

  • Create a test mojo in the Maven Plugin that invokes the main class as part of the process-test-classes phase. As part of this work, some of the code in the existing AotGenerateMojo can be refactored to be reused (typically the bits that do the compilation and copying).
  • Create a new Gradle task that invokes the main class
  • Update the native maven profile to include a call to the new mojo. This is worth a discussion as the testing with native bit could be totally opt-in. Perhaps it could be added but skipped by default with a way to enable it using a property?

Naming wise, we started a discussion in #31918.

Sub Tasks:

@snicoll snicoll added type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels Aug 18, 2022
@snicoll snicoll added this to the 3.0.0-M5 milestone Aug 18, 2022
@philwebb philwebb self-assigned this Aug 18, 2022
@sbrannen
Copy link
Member

For an overview of the current status of native testing support in the TestContext framework, see:

@wilkinsona wilkinsona changed the title Introduce support for processing test contexts Ahead-of-time Introduce support for processing test contexts ahead-of-time Sep 2, 2022
@philwebb philwebb removed this from the 3.0.0-M5 milestone Sep 15, 2022
@philwebb philwebb added status: superseded An issue that has been superseded by another and removed type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels Sep 15, 2022
@philwebb
Copy link
Member

Closing this one as superseded since all the sub-tasks have now been closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

3 participants