Skip to content

Commit 96ff4e1

Browse files
committed
DATAMONGO-2461 - Polishing.
Remove superfluous Test annotation as RepeatFailedTest acts as a TestTemplate so adding the Test annotation causes the test to run twice.
1 parent 2af13c2 commit 96ff4e1

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/ReactiveMongoTemplateIndexTests.java

+5-10
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ void setUp() {
8282
@AfterEach
8383
void cleanUp() {}
8484

85-
@Test // DATAMONGO-1444
86-
@RepeatFailedTest(3)
85+
@RepeatFailedTest(3) // DATAMONGO-1444
8786
void testEnsureIndexShouldCreateIndex() {
8887

8988
Person p1 = new Person("Oliver");
@@ -119,8 +118,7 @@ void testEnsureIndexShouldCreateIndex() {
119118
}).verifyComplete();
120119
}
121120

122-
@Test // DATAMONGO-1444
123-
@RepeatFailedTest(3)
121+
@RepeatFailedTest(3) // DATAMONGO-1444
124122
void getIndexInfoShouldReturnCorrectIndex() {
125123

126124
Person p1 = new Person("Oliver");
@@ -150,8 +148,7 @@ void getIndexInfoShouldReturnCorrectIndex() {
150148
}).verifyComplete();
151149
}
152150

153-
@Test // DATAMONGO-1444, DATAMONGO-2264
154-
@RepeatFailedTest(3)
151+
@RepeatFailedTest(3) // DATAMONGO-1444, DATAMONGO-2264
155152
void testReadIndexInfoForIndicesCreatedViaMongoShellCommands() {
156153

157154
template.indexOps(Person.class).dropAllIndexes() //
@@ -201,8 +198,7 @@ void testReadIndexInfoForIndicesCreatedViaMongoShellCommands() {
201198
}).verifyComplete();
202199
}
203200

204-
@Test // DATAMONGO-1928
205-
@RepeatFailedTest(3)
201+
@RepeatFailedTest(3) // DATAMONGO-1928
206202
void shouldCreateIndexOnAccess() {
207203

208204
template.getCollection("indexedSample").flatMapMany(it -> it.listIndexes(Document.class)) //
@@ -222,8 +218,7 @@ void shouldCreateIndexOnAccess() {
222218
.verifyComplete();
223219
}
224220

225-
@Test // DATAMONGO-1928, DATAMONGO-2264
226-
@RepeatFailedTest(3)
221+
@RepeatFailedTest(3) // DATAMONGO-1928, DATAMONGO-2264
227222
void indexCreationShouldFail() throws InterruptedException {
228223

229224
factory.getMongoDatabase() //

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/messaging/ChangeStreamTests.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ void useAggregationToFilterMessages() throws InterruptedException {
197197
assertThat(messageBodies).hasSize(2).doesNotContain(sugarSplashy);
198198
}
199199

200-
@Test // DATAMONGO-1803
201-
@RepeatFailedTest(3)
200+
@RepeatFailedTest(3) // DATAMONGO-1803
202201
void mapsTypedAggregationToFilterMessages() throws InterruptedException {
203202

204203
CollectingMessageListener<ChangeStreamDocument<Document>, User> messageListener = new CollectingMessageListener<>();

0 commit comments

Comments
 (0)