File tree 1 file changed +2
-2
lines changed
server/src/test/java/org/elasticsearch/index/replication
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 77
77
import java .util .stream .Collectors ;
78
78
79
79
import static org .hamcrest .Matchers .anyOf ;
80
+ import static org .hamcrest .Matchers .either ;
80
81
import static org .hamcrest .Matchers .empty ;
81
82
import static org .hamcrest .Matchers .equalTo ;
82
83
import static org .hamcrest .Matchers .everyItem ;
@@ -378,7 +379,6 @@ public void testReplicaRollbackStaleDocumentsInPeerRecovery() throws Exception {
378
379
}
379
380
380
381
public void testResyncAfterPrimaryPromotion () throws Exception {
381
- // TODO: check translog trimming functionality once rollback is implemented in Lucene (ES trimming is done)
382
382
Map <String , String > mappings =
383
383
Collections .singletonMap ("type" , "{ \" type\" : { \" properties\" : { \" f\" : { \" type\" : \" keyword\" } }}}" );
384
384
try (ReplicationGroup shards = new ReplicationGroup (buildIndexMetaData (2 , mappings ))) {
@@ -446,7 +446,7 @@ public void testResyncAfterPrimaryPromotion() throws Exception {
446
446
assertThat (source .source .utf8ToString (), is ("{ \" f\" : \" normal\" }" ));
447
447
}
448
448
}
449
- assertThat (translogOperations , is ( initialDocs + extraDocs ));
449
+ assertThat (translogOperations , either ( equalTo ( initialDocs + extraDocs )). or ( equalTo ( task . getResyncedOperations ()) ));
450
450
}
451
451
}
452
452
You can’t perform that action at this time.
0 commit comments