Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Add AOT processing for ApplicationContexts used in tests #911

Closed
sdeleuze opened this issue Jul 20, 2021 · 4 comments
Closed

Add AOT processing for ApplicationContexts used in tests #911

sdeleuze opened this issue Jul 20, 2021 · 4 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@sdeleuze
Copy link
Contributor

That would allow to support the *-agent samples.

@sdeleuze sdeleuze added this to the 0.11.0 milestone Jul 20, 2021
@sdeleuze
Copy link
Contributor Author

It probably makes sense to wait for #912 to be fixed to work on this one.

@bclozel bclozel removed their assignment Sep 14, 2021
@bclozel bclozel modified the milestones: 0.11.0, Backlog Sep 14, 2021
@snicoll snicoll self-assigned this Oct 4, 2021
@snicoll snicoll added the type: enhancement A general enhancement label Oct 4, 2021
@snicoll snicoll changed the title Support testing with ContextBootstrap generation Add AOT processing ApplicationContexts ussed in tests Oct 4, 2021
@snicoll
Copy link
Contributor

snicoll commented Oct 4, 2021

I've started to investigate this, using MergedContextConfiguration that's quite easy to call at build time using a source test class. This can also be used to figure out if the configuration of this test class matches another one. I have a prototype that generates the code but I haven't really tried to hook the test engine to it yet.

@snicoll snicoll changed the title Add AOT processing ApplicationContexts ussed in tests Add AOT processing for ApplicationContexts used in tests Oct 4, 2021
@sdeleuze sdeleuze modified the milestones: Backlog, 0.11.0-M2 Oct 4, 2021
@snicoll
Copy link
Contributor

snicoll commented Oct 20, 2021

This enhancement is quite significant so I've created a number of separate issues:

@sdeleuze sdeleuze modified the milestones: 0.11.0-M2, 0.11.0-RC1 Nov 2, 2021
bclozel added a commit that referenced this issue Nov 9, 2021
This commit ensures that the
`spring.test.context.default.CacheAwareContextLoaderDelegate` system
property is set also during the `nativeTest` task so that the
`AotCacheAwareContextLoaderDelegate` is not only used during AOT
generation, but also when tests are executed.

See gh-911
@snicoll
Copy link
Contributor

snicoll commented Nov 9, 2021

This turned out to be quite significant but we have things working on the AOT/JVM side of things with additional issues to cover what doesn't work yet on native.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement A general enhancement
Development

No branches or pull requests

3 participants