Madhura Bhave
64270eca51
Convert environment used by SpringBootTestContextLoader
...
This commit aligns `SpringBootTest`s to also use `ApplicationEnvironment`
instead of `StandardEnvironment`. This prevents the side-effect of active
profiles from `@ActiveProfiles` from being added to the environment when
doGetActiveProfiles is called. In this case, calling `addActiveProfiles()`
in the environment post processor would result in `@ActiveProfiles` being
added to the environment first, resulting in the wrong order.
The additional call to `setActiveProfiles()` is also not necessary when using
ApplicationEnvironment because that call was put in place to prevent the side-effect
which `ApplicationEnvironment` does not have.
Fixes gh-28530
4 years ago
Andy Wilkinson
2cec3971d7
Prohibit unwanted dependencies in all modules not just starters
...
Closes gh-28658
4 years ago
Phillip Webb
75bf430eb1
Polish ImportsContextCustomizerTests
...
Update the test classes to include an `@Import` annotation. Without this
the tests would not fail even if the filter is missing.
4 years ago
Phillip Webb
8a14e1e2e9
Polish 'Ignore JUnit annotations when caching test contexts'
...
See gh-28563
4 years ago
Loïc Ledoyen
23876d8a32
Ignore JUnit annotations when caching test contexts
...
Update `ImportsContextCustomizer` to ignore JUnit annotations.
See gh-28563
4 years ago
Stephane Nicoll
4304eea319
Polish contribution
...
See gh-28531
4 years ago
dreis2211
7d594aa301
Avoid duplicate AOP proxy class definition with FilteredClassLoader
...
See gh-28531
4 years ago
Stephane Nicoll
bf88405121
Flag BeanDefinitionRegistryPostProcessor beans with role infrastructure
...
Closes gh-28540
4 years ago
Stephane Nicoll
fbe614a61b
Fix bean type visibility
...
See gh-28437
4 years ago
Stephane Nicoll
2be0161f9a
Fix bean type visibility
...
See gh-28437
4 years ago
Andy Wilkinson
84b553a8ca
Upgrade to Jackson Bom 2.13.0
...
Closes gh-28298
4 years ago
Leo Li
1770f065a5
Polish
...
See gh-28239
4 years ago
Andy Wilkinson
9c9fbf400e
Upgrade to Spring Java Format 0.0.29
...
Closes gh-28205
4 years ago
Andy Wilkinson
f8ef90813f
Allow @MockBean to be used with Framework's @Repeat
...
Fixes gh-27693
4 years ago
Andy Wilkinson
ffbd28b60a
Polish "Polish access modifiers for test classes"
...
See gh-27736
4 years ago
izeye
8a425dedfd
Polish access modifiers for test classes
...
See gh-27736
4 years ago
Andy Wilkinson
01e741d703
Prohibit circular references by default
...
Closes gh-27652
4 years ago
Andy Wilkinson
228e4e3bc8
Make it easier to add new config options to ApplicationContextRunners
...
Closes gh-27690
4 years ago
Andy Wilkinson
7eb5f35f2f
Make WebTestClient creation back off when no HTTP client available
...
Fixes gh-27520
4 years ago
Andy Wilkinson
ee07d6c3ca
Increase response timeout for server-bound WebTestClients
...
Closes gh-27472
4 years ago
Andy Wilkinson
c8c784bd5c
Allow @SpyBean to be used to spy on a Spring Data repository
...
Fixes gh-7033
4 years ago
Stephane Nicoll
dc5acb0019
Remove deprecated code flagged for removal
...
Closes gh-27303
4 years ago
Stephane Nicoll
9e46061aa6
Allow to chain ContextConsumer implementations
...
Closes gh-26723
5 years ago
Phillip Webb
9e1c78da99
Update copyright year of changed files
5 years ago
weixsun
7f445630e4
Remove unnecessary semicolon
...
See gh-26446
5 years ago
Andy Wilkinson
be807bab12
Polish "Improve documentation of TestRestTemplate's fault tolerance"
...
See gh-26227
5 years ago
Carlos Rafael de Oliveira Carneiro
a6fa8addb9
Improve documentation of TestRestTemplate's fault tolerance
...
See gh-26227
5 years ago
Stephane Nicoll
d3c817b7ba
Polish "Remove unnecessary throws declaration in tests"
...
See gh-26441
5 years ago
weixsun
8a2be288a3
Remove unnecessary throws declaration in tests
...
See gh-26441
5 years ago
Stephane Nicoll
691bbcfdfd
Update copyright year of changed files
...
See gh-26448
5 years ago
weixsun
d115361980
Remove redundant suppression
...
See gh-26448
5 years ago
Phillip Webb
26dd1b9a26
Update deprecations with for removal targets
...
Update all deprecation tags to include a removal target.
Closes gh-25808
5 years ago
Phillip Webb
82127fdaa3
Update copyright year of changed files
5 years ago
Phillip Webb
663fd8ce5e
Update copyright year of changed files
5 years ago
Andy Wilkinson
22b73f3020
Polish "Improve documentaion of Mockito test execution listeners"
...
See gh-25375
5 years ago
dreis2211
1ccd8dae8a
Allow the project to be built with Java 16
...
See gh-25171
5 years ago
Andy Wilkinson
297e3079d0
Fix handling of UriTemplateRequestEntity in TestRestTemplate
...
A change [1] in Spring Framework 5.3 means that getUrl() on a
RequestEntity will throw an UnsupportedOperationException if the
entity was created using a template.
This commit updates TestRestTemplate to check for instances of
UriTemplateRequestEntity and to resolve the URI using the
entity's UriTemplateHandler instead of calling getUrl() directly.
Fixes gh-25097
[1] a0f4d81db7
5 years ago
Andy Wilkinson
67479b6380
Add junit-platform-launcher dependency by convention
...
Closes gh-25074
5 years ago
Phillip Webb
d06407ec0a
Update copyright year of changed files
5 years ago
Phillip Webb
d95d7a0245
Update code for Spring Framework 5.3.4
...
See gh-24998
5 years ago
Madhura Bhave
73a2a4b383
Consider context-path for WebTestClient baseUrl
...
Fixes gh-24168
5 years ago
dreis2211
fb207f73e7
Remove deprecated SpringBootContextLoader#getArgs()
...
See gh-24550
5 years ago
dreis2211
0ec603cdad
Avoid duplicates in MergedContextConfiguration
...
Remove duplicate config attribute classes by using a `Set` rather
than a `List` in the `SpringBootTestContextBootstrapper`.
See gh-24532
5 years ago
Phillip Webb
72d36e0c07
Update copyright year of changed files
5 years ago
Phillip Webb
837fc83527
Fix checkstyle header violations
...
See gh-24337
5 years ago
Stephane Nicoll
f248cfe79c
Polish "Check that WebClient is available"
...
See gh-24152
5 years ago
Tobias Gesellchen
f6255cc691
Check that WebClient is available
...
This commit reinstanties the isWeBClientPresent() check so that
WebTestClientContextCustomizer is only added if a web client is
available.
See gh-24152
5 years ago
Andy Wilkinson
6548ca4c11
Implement equals and hashCode in TestTypeExcludeFilter
...
Fixes gh-23978
5 years ago
Phillip Webb
929d8fcd3c
Update copyright year of changed files
5 years ago
Andy Wilkinson
506f7acc8d
Streamline use of TestContextAnnotationUtils
...
See gh-12470
5 years ago