Skip to content

Commit 664ecbd

Browse files
committed
Polish "Add DataCouchbaseTest annotation"
See gh-29912
1 parent 36e5275 commit 664ecbd

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ boot-features-testing-spring-boot-applications-testing-autoconfigured-json-tests
339339
boot-features-testing-spring-boot-applications-testing-autoconfigured-mvc-tests=features.testing.spring-boot-applications.spring-mvc-tests
340340
boot-features-testing-spring-boot-applications-testing-autoconfigured-webflux-tests=features.testing.spring-boot-applications.spring-webflux-tests
341341
boot-features-testing-spring-boot-applications-testing-autoconfigured-cassandra-test=features.testing.spring-boot-applications.autoconfigured-spring-data-cassandra
342-
boot-features-testing-spring-boot-applications-testing-autoconfigured-couchbase-test=features.testing.spring-boot-applications.autoconfigured-spring-data-couchbase
343342
boot-features-testing-spring-boot-applications-testing-autoconfigured-jpa-test=features.testing.spring-boot-applications.autoconfigured-spring-data-jpa
344343
boot-features-testing-spring-boot-applications-testing-autoconfigured-jdbc-test=features.testing.spring-boot-applications.autoconfigured-jdbc
345344
boot-features-testing-spring-boot-applications-testing-autoconfigured-data-jdbc-test=features.testing.spring-boot-applications.autoconfigured-spring-data-jdbc

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ include::code:MyDataCassandraTests[]
475475
[[features.testing.spring-boot-applications.autoconfigured-spring-data-couchbase]]
476476
==== Auto-configured Data Couchbase Tests
477477
You can use `@DataCouchbaseTest` to test Couchbase applications.
478-
By default, it configures a `CouchbaseTemplate`, scans for `@Document` classes, and configures Spring Data Couchbase repositories.
478+
By default, it configures a `CouchbaseTemplate` or `ReactiveCouchbaseTemplate`, scans for `@Document` classes, and configures Spring Data Couchbase repositories.
479479
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataCouchbaseTest` annotation is used.
480480
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
481481
(For more about using Couchbase with Spring Boot, see "<<data#data.nosql.couchbase>>", earlier in this chapter.)

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/couchbase/DataCouchbaseTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
import org.springframework.test.context.junit.jupiter.SpringExtension;
3838

3939
/**
40-
* Annotation that can be used for a Couchbase test that focuses <strong>only</strong> on
41-
* Couchbase components.
40+
* Annotation that can be used for a Data Couchbase test that focuses
41+
* <strong>only</strong> on Data Couchbase components.
4242
* <p>
4343
* Using this annotation will disable full auto-configuration and instead apply only
44-
* configuration relevant to Couchbase tests.
44+
* configuration relevant to Data Couchbase tests.
4545
* <p>
4646
* When using JUnit 4, this annotation should be used in combination with
4747
* {@code @RunWith(SpringRunner.class)}.

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/couchbase/DataCouchbaseTestReactiveIntegrationTests.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
import org.springframework.beans.factory.annotation.Autowired;
2828
import org.springframework.boot.testsupport.testcontainers.DockerImageNames;
29-
import org.springframework.context.ApplicationContext;
3029
import org.springframework.data.couchbase.core.ReactiveCouchbaseTemplate;
3130
import org.springframework.test.context.DynamicPropertyRegistry;
3231
import org.springframework.test.context.DynamicPropertySource;
@@ -64,9 +63,6 @@ static void couchbaseProperties(DynamicPropertyRegistry registry) {
6463
@Autowired
6564
private ExampleReactiveRepository exampleReactiveRepository;
6665

67-
@Autowired
68-
private ApplicationContext applicationContext;
69-
7066
@Test
7167
void testRepository() {
7268
ExampleDocument document = new ExampleDocument();

0 commit comments

Comments
 (0)