You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow overriding dynamic property from enclosing class in nested test class
Prior to this commit, a dynamic property registered via a
@DynamicPropertySource method in a @nested test class was not able to
override a property registered via a @DynamicPropertySource method in
the enclosing class.
See gh-26091Closesgh-31083
Copy file name to clipboardExpand all lines: spring-test/src/main/java/org/springframework/test/context/support/DynamicPropertiesContextCustomizerFactory.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@
35
35
*
36
36
* @author Phillip Webb
37
37
* @author Sam Brannen
38
+
* @author Yanming Zhou
38
39
* @since 5.2.5
39
40
* @see DynamicPropertiesContextCustomizer
40
41
*/
@@ -54,10 +55,10 @@ public DynamicPropertiesContextCustomizer createContextCustomizer(Class<?> testC
Copy file name to clipboardExpand all lines: spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/DynamicPropertySourceNestedTests.java
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@
39
39
* {@link SpringExtension} in a JUnit Jupiter environment.
40
40
*
41
41
* @author Sam Brannen
42
+
* @author Yanming Zhou
42
43
* @since 5.3.2
43
44
*/
44
45
@SpringJUnitConfig
@@ -125,6 +126,22 @@ void serviceHasInjectedValues(@Autowired Service service) {
0 commit comments