From 29cd1cc762f81c6918d7465bfa1c81f015b9fcf7 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Tue, 27 Nov 2018 16:35:02 +0100 Subject: [PATCH 1/2] Document that test slices should not be combined See gh-15310 --- .../src/main/asciidoc/spring-boot-features.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index ac2370a9585..04ba4491fd8 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -6837,6 +6837,10 @@ restricted set of auto-configuration classes. If you need to exclude one of them most `@...Test` annotations provide an `excludeAutoConfiguration` attribute. Alternatively, you can use `@ImportAutoConfiguration#exclude`. +NOTE: Including multiple "`slices`" via the several `@...Test` annotations in one test is +not supported. If you need multiple "`slices`", pick one of the `@...Test` annotations +and include the `@AutoConfigure...` annotations of the other "`slices`" by hand. + TIP: It is also possible to use the `@AutoConfigure...` annotations with the standard `@SpringBootTest` annotation. You can use this combination if you are not interested in "`slicing`" your application but you want some of the auto-configured test beans. From 760003b9d77c3ae0df67fb787052e6b3210805d8 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 27 Nov 2018 15:49:37 +0000 Subject: [PATCH 2/2] Polish "Document that test slices should not be combined" Closes gh-15310 --- .../src/main/asciidoc/spring-boot-features.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 04ba4491fd8..f1c05508ccc 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -6837,7 +6837,7 @@ restricted set of auto-configuration classes. If you need to exclude one of them most `@...Test` annotations provide an `excludeAutoConfiguration` attribute. Alternatively, you can use `@ImportAutoConfiguration#exclude`. -NOTE: Including multiple "`slices`" via the several `@...Test` annotations in one test is +NOTE: Including multiple "`slices`" by using several `@...Test` annotations in one test is not supported. If you need multiple "`slices`", pick one of the `@...Test` annotations and include the `@AutoConfigure...` annotations of the other "`slices`" by hand.