|
|
@@ -74,6 +74,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import static org.hamcrest.Matchers.anyOf;
|
|
|
+import static org.hamcrest.Matchers.either;
|
|
|
import static org.hamcrest.Matchers.empty;
|
|
|
import static org.hamcrest.Matchers.equalTo;
|
|
|
import static org.hamcrest.Matchers.everyItem;
|
|
|
@@ -309,9 +310,7 @@ public class RecoveryDuringReplicationTests extends ESIndexLevelReplicationTestC
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/52598")
|
|
|
public void testResyncAfterPrimaryPromotion() throws Exception {
|
|
|
- // TODO: check translog trimming functionality once rollback is implemented in Lucene (ES trimming is done)
|
|
|
String mappings = "{ \"_doc\": { \"properties\": { \"f\": { \"type\": \"keyword\"} }}}";
|
|
|
try (ReplicationGroup shards = new ReplicationGroup(buildIndexMetaData(2, mappings))) {
|
|
|
shards.startAll();
|
|
|
@@ -378,7 +377,7 @@ public class RecoveryDuringReplicationTests extends ESIndexLevelReplicationTestC
|
|
|
assertThat(source.source.utf8ToString(), is("{ \"f\": \"normal\"}"));
|
|
|
}
|
|
|
}
|
|
|
- assertThat(translogOperations, is(initialDocs + extraDocs));
|
|
|
+ assertThat(translogOperations, either(equalTo(initialDocs + extraDocs)).or(equalTo(task.getResyncedOperations())));
|
|
|
}
|
|
|
}
|
|
|
|