-
Notifications
You must be signed in to change notification settings - Fork 353
Fix MergedContextConfiguration cache key for runtime contexts #1341
Fix MergedContextConfiguration cache key for runtime contexts #1341
Conversation
Web support is not working with the status quo, so I'll have to take another look.
|
fe9b0df
to
dd5fdb5
Compare
dd5fdb5
to
855495b
Compare
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.
As requested by @sdeleuze, here's a first review. Happy to chat if more details are needed.
...n/java/org/springframework/aot/test/context/bootstrap/generator/TestContextAotProcessor.java
Outdated
Show resolved
Hide resolved
...n/java/org/springframework/aot/test/context/bootstrap/generator/TestContextAotProcessor.java
Outdated
Show resolved
Hide resolved
...n/java/org/springframework/aot/test/context/bootstrap/generator/TestContextAotProcessor.java
Outdated
Show resolved
Hide resolved
...n/java/org/springframework/aot/test/context/bootstrap/generator/TestContextAotProcessor.java
Outdated
Show resolved
Hide resolved
...a/org/springframework/aot/test/context/bootstrap/generator/TestContextAotProcessorTests.java
Outdated
Show resolved
Hide resolved
spring-native/src/main/java/org/springframework/aot/test/AotContextLoader.java
Outdated
Show resolved
Hide resolved
spring-native/src/main/java/org/springframework/aot/test/AotContextLoader.java
Outdated
Show resolved
Hide resolved
spring-native/src/main/java/org/springframework/aot/test/AotMergedContextConfiguration.java
Show resolved
Hide resolved
MergedContextConfiguration mergedConfig = createMergedContextConfiguration(SampleTest.class); | ||
assertThat(delegate.loadContext(mergedConfig)).isSameAs(this.applicationContext); | ||
|
||
// loadContext() must actually be invoked with the original MergedContextConfiguration |
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.
It will take me a bit of time to process this but, at a quick glance, I generally feel that a "lot' of explanations like that in a test is the sign that something else should be made more explicit.
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.
Fair enough.
I'll move the comments to actual Javadoc in the production code.
spring-native/src/main/java/org/springframework/aot/test/AotMergedContextConfiguration.java
Show resolved
Hide resolved
Please let me know when this PR is ready for final review and merge. |
I'll post here when it's ready. |
These tests also indirectly verify the implementation of equals() and hashCode() for instances of AotMergedContextConfiguration created by AotCacheAwareContextLoaderDelegate. See spring-atticgh-1262
855495b
to
56f3be2
Compare
This PR is ready for a final review. The only remaining task is an update to the Javadoc (see #1341 (comment)), but that can be done at later date if necessary. |
Thanks Sam, this looks good. |
This is a fix for #1262.
A more detailed commit message will be crafted after peer review.