Skip to content

Commit 3bffe40

Browse files
christophstroblmp911de
authored andcommitted
DATAMONGO-2394 - Fix test issues related to JUnit5 upgrade.
Execution time and test order changed by using JUnit5. This commit fixes some of the issues related to index creation where actually not needed. Original pull request: #798.
1 parent 6959c56 commit 3bffe40

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ public MongoClient mongoClient() {
6060
protected String getDatabaseName() {
6161
return "collation-tests";
6262
}
63+
64+
@Override
65+
protected boolean autoIndexCreation() {
66+
return false;
67+
}
6368
}
6469

6570
@Autowired MongoTemplate template;

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ protected String getDatabaseName() {
8585
return DB_NAME;
8686
}
8787

88+
@Override
89+
protected boolean autoIndexCreation() {
90+
return false;
91+
}
92+
8893
@Bean
8994
MongoTransactionManager txManager(MongoDbFactory dbFactory) {
9095
return new MongoTransactionManager(dbFactory);

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ public MongoClient mongoClient() {
7474
protected String getDatabaseName() {
7575
return "validation-tests";
7676
}
77+
78+
@Override
79+
protected boolean autoIndexCreation() {
80+
return false;
81+
}
7782
}
7883

7984
@Autowired MongoTemplate template;

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ protected String getDatabaseName() {
5959
public MongoClient mongoClient() {
6060
return MongoTestUtils.client();
6161
}
62+
63+
@Override
64+
protected boolean autoIndexCreation() {
65+
return false;
66+
}
6267
}
6368

6469
@Autowired MongoOperations mongoOps;

0 commit comments

Comments
 (0)