File tree 1 file changed +2
-3
lines changed
server/src/test/java/org/elasticsearch/index/replication 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 74
74
import java .util .stream .Collectors ;
75
75
76
76
import static org .hamcrest .Matchers .anyOf ;
77
+ import static org .hamcrest .Matchers .either ;
77
78
import static org .hamcrest .Matchers .empty ;
78
79
import static org .hamcrest .Matchers .equalTo ;
79
80
import static org .hamcrest .Matchers .everyItem ;
@@ -309,9 +310,7 @@ public void testReplicaRollbackStaleDocumentsInPeerRecovery() throws Exception {
309
310
}
310
311
}
311
312
312
- @ AwaitsFix (bugUrl = "https://github.com/elastic/elasticsearch/issues/52598" )
313
313
public void testResyncAfterPrimaryPromotion () throws Exception {
314
- // TODO: check translog trimming functionality once rollback is implemented in Lucene (ES trimming is done)
315
314
String mappings = "{ \" _doc\" : { \" properties\" : { \" f\" : { \" type\" : \" keyword\" } }}}" ;
316
315
try (ReplicationGroup shards = new ReplicationGroup (buildIndexMetaData (2 , mappings ))) {
317
316
shards .startAll ();
@@ -378,7 +377,7 @@ public void testResyncAfterPrimaryPromotion() throws Exception {
378
377
assertThat (source .source .utf8ToString (), is ("{ \" f\" : \" normal\" }" ));
379
378
}
380
379
}
381
- assertThat (translogOperations , is ( initialDocs + extraDocs ));
380
+ assertThat (translogOperations , either ( equalTo ( initialDocs + extraDocs )). or ( equalTo ( task . getResyncedOperations ()) ));
382
381
}
383
382
}
384
383
You can’t perform that action at this time.
0 commit comments