File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ public void throwsExceptionForDuplicateIds() {
237
237
template .insert (person );
238
238
fail ("Expected DataIntegrityViolationException!" );
239
239
} catch (DataIntegrityViolationException e ) {
240
- assertThat (e .getMessage (), containsString ("E11000 duplicate key error index: database.person.$_id_ " ));
240
+ assertThat (e .getMessage (), containsString ("E11000 duplicate key error" ));
241
241
}
242
242
}
243
243
@@ -289,7 +289,7 @@ public void throwsExceptionForIndexViolationIfConfigured() {
289
289
template .save (person );
290
290
fail ("Expected DataIntegrityViolationException!" );
291
291
} catch (DataIntegrityViolationException e ) {
292
- assertThat (e .getMessage (), containsString ("E11000 duplicate key error index: database.person.$firstName_-1 " ));
292
+ assertThat (e .getMessage (), containsString ("E11000 duplicate key error" ));
293
293
}
294
294
}
295
295
@@ -300,7 +300,7 @@ public void throwsExceptionForIndexViolationIfConfigured() {
300
300
public void rejectsDuplicateIdInInsertAll () {
301
301
302
302
thrown .expect (DataIntegrityViolationException .class );
303
- thrown .expectMessage ("E11000 duplicate key error index: database.person.$_id_ " );
303
+ thrown .expectMessage ("E11000 duplicate key error" );
304
304
305
305
MongoTemplate template = new MongoTemplate (factory );
306
306
template .setWriteResultChecking (WriteResultChecking .EXCEPTION );
You can’t perform that action at this time.
0 commit comments