@@ -349,18 +349,12 @@ public void testEnsureIndex() throws Exception {
349
349
assertThat (indexInfo .size (), is (2 ));
350
350
Object indexKey = null ;
351
351
boolean unique = false ;
352
- boolean dropDupes = false ;
353
352
for (org .bson .Document ix : indexInfo ) {
354
353
355
354
if ("age_-1" .equals (ix .get ("name" ))) {
356
355
indexKey = ix .get ("key" );
357
356
unique = (Boolean ) ix .get ("unique" );
358
- if (mongoVersion .isLessThan (TWO_DOT_EIGHT )) {
359
- dropDupes = (Boolean ) ix .get ("dropDups" );
360
- assertThat (dropDupes , is (true ));
361
- } else {
362
- assertThat (ix .get ("dropDups" ), is (nullValue ()));
363
- }
357
+ assertThat (ix .get ("dropDups" ), is (nullValue ()));
364
358
}
365
359
}
366
360
assertThat (((org .bson .Document ) indexKey ), IsMapContaining .<String , Object > hasEntry ("age" , -1 ));
@@ -371,13 +365,7 @@ public void testEnsureIndex() throws Exception {
371
365
assertThat (indexInfoList .size (), is (2 ));
372
366
IndexInfo ii = indexInfoList .get (1 );
373
367
assertThat (ii .isUnique (), is (true ));
374
-
375
- if (mongoVersion .isLessThan (TWO_DOT_EIGHT )) {
376
- assertThat (ii .isDropDuplicates (), is (true ));
377
- } else {
378
- assertThat (ii .isDropDuplicates (), is (false ));
379
- }
380
-
368
+ assertThat (ii .isDropDuplicates (), is (false ));
381
369
assertThat (ii .isSparse (), is (false ));
382
370
383
371
List <IndexField > indexFields = ii .getIndexFields ();
0 commit comments