File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
server/src/test/java/org/elasticsearch/index/replication Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 7474import java .util .stream .Collectors ;
7575
7676import static org .hamcrest .Matchers .anyOf ;
77+ import static org .hamcrest .Matchers .either ;
7778import static org .hamcrest .Matchers .empty ;
7879import static org .hamcrest .Matchers .equalTo ;
7980import static org .hamcrest .Matchers .everyItem ;
@@ -309,9 +310,7 @@ public void testReplicaRollbackStaleDocumentsInPeerRecovery() throws Exception {
309310 }
310311 }
311312
312- @ AwaitsFix (bugUrl = "https://github.com/elastic/elasticsearch/issues/52598" )
313313 public void testResyncAfterPrimaryPromotion () throws Exception {
314- // TODO: check translog trimming functionality once rollback is implemented in Lucene (ES trimming is done)
315314 String mappings = "{ \" _doc\" : { \" properties\" : { \" f\" : { \" type\" : \" keyword\" } }}}" ;
316315 try (ReplicationGroup shards = new ReplicationGroup (buildIndexMetaData (2 , mappings ))) {
317316 shards .startAll ();
@@ -378,7 +377,7 @@ public void testResyncAfterPrimaryPromotion() throws Exception {
378377 assertThat (source .source .utf8ToString (), is ("{ \" f\" : \" normal\" }" ));
379378 }
380379 }
381- assertThat (translogOperations , is ( initialDocs + extraDocs ));
380+ assertThat (translogOperations , either ( equalTo ( initialDocs + extraDocs )). or ( equalTo ( task . getResyncedOperations ()) ));
382381 }
383382 }
384383
You can’t perform that action at this time.
0 commit comments