mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-20 03:45:02 +00:00
[TEST] changed naming of test methods to not refer to old api names.
This commit is contained in:
parent
7e04a2bdf7
commit
3d7e3b2ab1
@ -186,9 +186,8 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
assertAcked(client().admin().indices().prepareCreate("index1").setSource(leaderIndexSettings, XContentType.JSON));
|
assertAcked(client().admin().indices().prepareCreate("index1").setSource(leaderIndexSettings, XContentType.JSON));
|
||||||
ensureYellow("index1");
|
ensureYellow("index1");
|
||||||
|
|
||||||
final ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
final PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
final PutFollowAction.Request createAndFollowRequest = new PutFollowAction.Request(followRequest);
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
client().execute(PutFollowAction.INSTANCE, createAndFollowRequest).get();
|
|
||||||
|
|
||||||
final int firstBatchNumDocs = randomIntBetween(2, 64);
|
final int firstBatchNumDocs = randomIntBetween(2, 64);
|
||||||
logger.info("Indexing [{}] docs as first batch", firstBatchNumDocs);
|
logger.info("Indexing [{}] docs as first batch", firstBatchNumDocs);
|
||||||
@ -213,7 +212,7 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unfollowIndex("index2");
|
unfollowIndex("index2");
|
||||||
client().execute(ResumeFollowAction.INSTANCE, followRequest).get();
|
client().execute(ResumeFollowAction.INSTANCE, followRequest.getFollowRequest()).get();
|
||||||
final int secondBatchNumDocs = randomIntBetween(2, 64);
|
final int secondBatchNumDocs = randomIntBetween(2, 64);
|
||||||
logger.info("Indexing [{}] docs as second batch", secondBatchNumDocs);
|
logger.info("Indexing [{}] docs as second batch", secondBatchNumDocs);
|
||||||
for (int i = firstBatchNumDocs; i < firstBatchNumDocs + secondBatchNumDocs; i++) {
|
for (int i = firstBatchNumDocs; i < firstBatchNumDocs + secondBatchNumDocs; i++) {
|
||||||
@ -245,9 +244,8 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
assertAcked(client().admin().indices().prepareCreate("index1").setSource(leaderIndexSettings, XContentType.JSON));
|
assertAcked(client().admin().indices().prepareCreate("index1").setSource(leaderIndexSettings, XContentType.JSON));
|
||||||
ensureYellow("index1");
|
ensureYellow("index1");
|
||||||
|
|
||||||
final ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
final PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
final PutFollowAction.Request createAndFollowRequest = new PutFollowAction.Request(followRequest);
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
client().execute(PutFollowAction.INSTANCE, createAndFollowRequest).get();
|
|
||||||
|
|
||||||
final long firstBatchNumDocs = randomIntBetween(2, 64);
|
final long firstBatchNumDocs = randomIntBetween(2, 64);
|
||||||
for (long i = 0; i < firstBatchNumDocs; i++) {
|
for (long i = 0; i < firstBatchNumDocs; i++) {
|
||||||
@ -286,9 +284,8 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
.build()));
|
.build()));
|
||||||
ensureGreen("index1");
|
ensureGreen("index1");
|
||||||
|
|
||||||
final ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
final PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
final PutFollowAction.Request createAndFollowRequest = new PutFollowAction.Request(followRequest);
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
client().execute(PutFollowAction.INSTANCE, createAndFollowRequest).get();
|
|
||||||
|
|
||||||
client().prepareIndex("index1", "doc", "1").setSource("{\"f\":1}", XContentType.JSON).get();
|
client().prepareIndex("index1", "doc", "1").setSource("{\"f\":1}", XContentType.JSON).get();
|
||||||
assertBusy(() -> assertThat(client().prepareSearch("index2").get().getHits().totalHits, equalTo(1L)));
|
assertBusy(() -> assertThat(client().prepareSearch("index2").get().getHits().totalHits, equalTo(1L)));
|
||||||
@ -337,13 +334,12 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
long numDocsIndexed = Math.min(3000 * 2, randomLongBetween(maxReadSize, maxReadSize * 10));
|
long numDocsIndexed = Math.min(3000 * 2, randomLongBetween(maxReadSize, maxReadSize * 10));
|
||||||
atLeastDocsIndexed("index1", numDocsIndexed / 3);
|
atLeastDocsIndexed("index1", numDocsIndexed / 3);
|
||||||
|
|
||||||
ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
followRequest.setMaxBatchOperationCount(maxReadSize);
|
followRequest.getFollowRequest().setMaxBatchOperationCount(maxReadSize);
|
||||||
followRequest.setMaxConcurrentReadBatches(randomIntBetween(2, 10));
|
followRequest.getFollowRequest().setMaxConcurrentReadBatches(randomIntBetween(2, 10));
|
||||||
followRequest.setMaxConcurrentWriteBatches(randomIntBetween(2, 10));
|
followRequest.getFollowRequest().setMaxConcurrentWriteBatches(randomIntBetween(2, 10));
|
||||||
followRequest.setMaxWriteBufferSize(randomIntBetween(1024, 10240));
|
followRequest.getFollowRequest().setMaxWriteBufferSize(randomIntBetween(1024, 10240));
|
||||||
PutFollowAction.Request createAndFollowRequest = new PutFollowAction.Request(followRequest);
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
client().execute(PutFollowAction.INSTANCE, createAndFollowRequest).get();
|
|
||||||
|
|
||||||
atLeastDocsIndexed("index1", numDocsIndexed);
|
atLeastDocsIndexed("index1", numDocsIndexed);
|
||||||
run.set(false);
|
run.set(false);
|
||||||
@ -379,14 +375,14 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
});
|
});
|
||||||
thread.start();
|
thread.start();
|
||||||
|
|
||||||
ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
followRequest.setMaxBatchOperationCount(randomIntBetween(32, 2048));
|
followRequest.getFollowRequest().setMaxBatchOperationCount(randomIntBetween(32, 2048));
|
||||||
followRequest.setMaxConcurrentReadBatches(randomIntBetween(2, 10));
|
followRequest.getFollowRequest().setMaxConcurrentReadBatches(randomIntBetween(2, 10));
|
||||||
followRequest.setMaxConcurrentWriteBatches(randomIntBetween(2, 10));
|
followRequest.getFollowRequest().setMaxConcurrentWriteBatches(randomIntBetween(2, 10));
|
||||||
client().execute(PutFollowAction.INSTANCE, new PutFollowAction.Request(followRequest)).get();
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
|
|
||||||
long maxNumDocsReplicated = Math.min(1000, randomLongBetween(followRequest.getMaxBatchOperationCount(),
|
long maxNumDocsReplicated = Math.min(1000, randomLongBetween(followRequest.getFollowRequest().getMaxBatchOperationCount(),
|
||||||
followRequest.getMaxBatchOperationCount() * 10));
|
followRequest.getFollowRequest().getMaxBatchOperationCount() * 10));
|
||||||
long minNumDocsReplicated = maxNumDocsReplicated / 3L;
|
long minNumDocsReplicated = maxNumDocsReplicated / 3L;
|
||||||
logger.info("waiting for at least [{}] documents to be indexed and then stop a random data node", minNumDocsReplicated);
|
logger.info("waiting for at least [{}] documents to be indexed and then stop a random data node", minNumDocsReplicated);
|
||||||
atLeastDocsIndexed("index2", minNumDocsReplicated);
|
atLeastDocsIndexed("index2", minNumDocsReplicated);
|
||||||
@ -408,8 +404,8 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
internalCluster().ensureAtLeastNumDataNodes(2);
|
internalCluster().ensureAtLeastNumDataNodes(2);
|
||||||
ensureGreen("index1");
|
ensureGreen("index1");
|
||||||
|
|
||||||
final ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
final PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
client().execute(PutFollowAction.INSTANCE, new PutFollowAction.Request(followRequest)).get();
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
|
|
||||||
final int numDocs = randomIntBetween(2, 64);
|
final int numDocs = randomIntBetween(2, 64);
|
||||||
for (int i = 0; i < numDocs; i++) {
|
for (int i = 0; i < numDocs; i++) {
|
||||||
@ -452,19 +448,19 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
assertAcked(client().admin().indices().prepareCreate("test-leader").get());
|
assertAcked(client().admin().indices().prepareCreate("test-leader").get());
|
||||||
assertAcked(client().admin().indices().prepareCreate("test-follower").get());
|
assertAcked(client().admin().indices().prepareCreate("test-follower").get());
|
||||||
// Leader index does not exist.
|
// Leader index does not exist.
|
||||||
ResumeFollowAction.Request followRequest1 = createFollowRequest("non-existent-leader", "test-follower");
|
ResumeFollowAction.Request followRequest1 = resumeFollow("non-existent-leader", "test-follower");
|
||||||
expectThrows(IndexNotFoundException.class, () -> client().execute(ResumeFollowAction.INSTANCE, followRequest1).actionGet());
|
expectThrows(IndexNotFoundException.class, () -> client().execute(ResumeFollowAction.INSTANCE, followRequest1).actionGet());
|
||||||
expectThrows(IndexNotFoundException.class,
|
expectThrows(IndexNotFoundException.class,
|
||||||
() -> client().execute(PutFollowAction.INSTANCE, new PutFollowAction.Request(followRequest1))
|
() -> client().execute(PutFollowAction.INSTANCE, new PutFollowAction.Request(followRequest1))
|
||||||
.actionGet());
|
.actionGet());
|
||||||
// Follower index does not exist.
|
// Follower index does not exist.
|
||||||
ResumeFollowAction.Request followRequest2 = createFollowRequest("non-test-leader", "non-existent-follower");
|
ResumeFollowAction.Request followRequest2 = resumeFollow("non-test-leader", "non-existent-follower");
|
||||||
expectThrows(IndexNotFoundException.class, () -> client().execute(ResumeFollowAction.INSTANCE, followRequest2).actionGet());
|
expectThrows(IndexNotFoundException.class, () -> client().execute(ResumeFollowAction.INSTANCE, followRequest2).actionGet());
|
||||||
expectThrows(IndexNotFoundException.class,
|
expectThrows(IndexNotFoundException.class,
|
||||||
() -> client().execute(PutFollowAction.INSTANCE, new PutFollowAction.Request(followRequest2))
|
() -> client().execute(PutFollowAction.INSTANCE, new PutFollowAction.Request(followRequest2))
|
||||||
.actionGet());
|
.actionGet());
|
||||||
// Both indices do not exist.
|
// Both indices do not exist.
|
||||||
ResumeFollowAction.Request followRequest3 = createFollowRequest("non-existent-leader", "non-existent-follower");
|
ResumeFollowAction.Request followRequest3 = resumeFollow("non-existent-leader", "non-existent-follower");
|
||||||
expectThrows(IndexNotFoundException.class, () -> client().execute(ResumeFollowAction.INSTANCE, followRequest3).actionGet());
|
expectThrows(IndexNotFoundException.class, () -> client().execute(ResumeFollowAction.INSTANCE, followRequest3).actionGet());
|
||||||
expectThrows(IndexNotFoundException.class,
|
expectThrows(IndexNotFoundException.class,
|
||||||
() -> client().execute(PutFollowAction.INSTANCE, new PutFollowAction.Request(followRequest3))
|
() -> client().execute(PutFollowAction.INSTANCE, new PutFollowAction.Request(followRequest3))
|
||||||
@ -484,10 +480,9 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
client().prepareIndex("index1", "doc", Integer.toString(i)).setSource(source, XContentType.JSON).get();
|
client().prepareIndex("index1", "doc", Integer.toString(i)).setSource(source, XContentType.JSON).get();
|
||||||
}
|
}
|
||||||
|
|
||||||
ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
followRequest.setMaxOperationSizeInBytes(1L);
|
followRequest.getFollowRequest().setMaxOperationSizeInBytes(1L);
|
||||||
final PutFollowAction.Request createAndFollowRequest = new PutFollowAction.Request(followRequest);
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
client().execute(PutFollowAction.INSTANCE, createAndFollowRequest).get();
|
|
||||||
|
|
||||||
final Map<ShardId, Long> firstBatchNumDocsPerShard = new HashMap<>();
|
final Map<ShardId, Long> firstBatchNumDocsPerShard = new HashMap<>();
|
||||||
final ShardStats[] firstBatchShardStats = client().admin().indices().prepareStats("index1").get().getIndex("index1").getShards();
|
final ShardStats[] firstBatchShardStats = client().admin().indices().prepareStats("index1").get().getIndex("index1").getShards();
|
||||||
@ -514,21 +509,19 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
assertAcked(client().admin().indices().prepareCreate("index3").setSource(leaderIndexSettings, XContentType.JSON));
|
assertAcked(client().admin().indices().prepareCreate("index3").setSource(leaderIndexSettings, XContentType.JSON));
|
||||||
ensureGreen("index3");
|
ensureGreen("index3");
|
||||||
|
|
||||||
ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
PutFollowAction.Request createAndFollowRequest = new PutFollowAction.Request(followRequest);
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
client().execute(PutFollowAction.INSTANCE, createAndFollowRequest).get();
|
|
||||||
|
|
||||||
followRequest = createFollowRequest("index3", "index4");
|
followRequest = follow("index3", "index4");
|
||||||
createAndFollowRequest = new PutFollowAction.Request(followRequest);
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
client().execute(PutFollowAction.INSTANCE, createAndFollowRequest).get();
|
|
||||||
unfollowIndex("index2", "index4");
|
unfollowIndex("index2", "index4");
|
||||||
|
|
||||||
ResumeFollowAction.Request wrongRequest1 = createFollowRequest("index1", "index4");
|
ResumeFollowAction.Request wrongRequest1 = resumeFollow("index1", "index4");
|
||||||
Exception e = expectThrows(IllegalArgumentException.class,
|
Exception e = expectThrows(IllegalArgumentException.class,
|
||||||
() -> client().execute(ResumeFollowAction.INSTANCE, wrongRequest1).actionGet());
|
() -> client().execute(ResumeFollowAction.INSTANCE, wrongRequest1).actionGet());
|
||||||
assertThat(e.getMessage(), containsString("follow index [index4] should reference"));
|
assertThat(e.getMessage(), containsString("follow index [index4] should reference"));
|
||||||
|
|
||||||
ResumeFollowAction.Request wrongRequest2 = createFollowRequest("index3", "index2");
|
ResumeFollowAction.Request wrongRequest2 = resumeFollow("index3", "index2");
|
||||||
e = expectThrows(IllegalArgumentException.class, () -> client().execute(ResumeFollowAction.INSTANCE, wrongRequest2).actionGet());
|
e = expectThrows(IllegalArgumentException.class, () -> client().execute(ResumeFollowAction.INSTANCE, wrongRequest2).actionGet());
|
||||||
assertThat(e.getMessage(), containsString("follow index [index2] should reference"));
|
assertThat(e.getMessage(), containsString("follow index [index2] should reference"));
|
||||||
}
|
}
|
||||||
@ -537,9 +530,8 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
String leaderIndexSettings = getIndexSettings(1, 0, singletonMap(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), "true"));
|
String leaderIndexSettings = getIndexSettings(1, 0, singletonMap(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), "true"));
|
||||||
assertAcked(client().admin().indices().prepareCreate("index1").setSource(leaderIndexSettings, XContentType.JSON).get());
|
assertAcked(client().admin().indices().prepareCreate("index1").setSource(leaderIndexSettings, XContentType.JSON).get());
|
||||||
ensureYellow("index1");
|
ensureYellow("index1");
|
||||||
ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
PutFollowAction.Request createAndFollowRequest = new PutFollowAction.Request(followRequest);
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
client().execute(PutFollowAction.INSTANCE, createAndFollowRequest).get();
|
|
||||||
unfollowIndex("index2");
|
unfollowIndex("index2");
|
||||||
client().admin().indices().close(new CloseIndexRequest("index2")).actionGet();
|
client().admin().indices().close(new CloseIndexRequest("index2")).actionGet();
|
||||||
|
|
||||||
@ -559,9 +551,8 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
|
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
|
||||||
.build()));
|
.build()));
|
||||||
|
|
||||||
final ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
final PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
final PutFollowAction.Request createAndFollowRequest = new PutFollowAction.Request(followRequest);
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
client().execute(PutFollowAction.INSTANCE, createAndFollowRequest).get();
|
|
||||||
|
|
||||||
client().prepareIndex("index1", "doc", "1").setSource("{}", XContentType.JSON).get();
|
client().prepareIndex("index1", "doc", "1").setSource("{}", XContentType.JSON).get();
|
||||||
assertBusy(() -> assertThat(client().prepareSearch("index2").get().getHits().totalHits, equalTo(1L)));
|
assertBusy(() -> assertThat(client().prepareSearch("index2").get().getHits().totalHits, equalTo(1L)));
|
||||||
@ -594,9 +585,8 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
|
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
|
||||||
.build()));
|
.build()));
|
||||||
|
|
||||||
final ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
final PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
final PutFollowAction.Request createAndFollowRequest = new PutFollowAction.Request(followRequest);
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
client().execute(PutFollowAction.INSTANCE, createAndFollowRequest).get();
|
|
||||||
|
|
||||||
client().prepareIndex("index1", "doc", "1").setSource("{}", XContentType.JSON).get();
|
client().prepareIndex("index1", "doc", "1").setSource("{}", XContentType.JSON).get();
|
||||||
assertBusy(() -> assertThat(client().prepareSearch("index2").get().getHits().totalHits, equalTo(1L)));
|
assertBusy(() -> assertThat(client().prepareSearch("index2").get().getHits().totalHits, equalTo(1L)));
|
||||||
@ -624,9 +614,8 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
|
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
|
||||||
.build()));
|
.build()));
|
||||||
|
|
||||||
final ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
final PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
final PutFollowAction.Request createAndFollowRequest = new PutFollowAction.Request(followRequest);
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
client().execute(PutFollowAction.INSTANCE, createAndFollowRequest).get();
|
|
||||||
|
|
||||||
client().prepareIndex("index1", "doc", "1").setSource("{}", XContentType.JSON).get();
|
client().prepareIndex("index1", "doc", "1").setSource("{}", XContentType.JSON).get();
|
||||||
assertBusy(() -> assertThat(client().prepareSearch("index2").get().getHits().totalHits, equalTo(1L)));
|
assertBusy(() -> assertThat(client().prepareSearch("index2").get().getHits().totalHits, equalTo(1L)));
|
||||||
@ -643,9 +632,8 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
|
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
|
||||||
.build()));
|
.build()));
|
||||||
|
|
||||||
final ResumeFollowAction.Request followRequest = createFollowRequest("index1", "index2");
|
final PutFollowAction.Request followRequest = follow("index1", "index2");
|
||||||
final PutFollowAction.Request createAndFollowRequest = new PutFollowAction.Request(followRequest);
|
client().execute(PutFollowAction.INSTANCE, followRequest).get();
|
||||||
client().execute(PutFollowAction.INSTANCE, createAndFollowRequest).get();
|
|
||||||
|
|
||||||
client().prepareIndex("index1", "doc", "1").setSource("{}", XContentType.JSON).get();
|
client().prepareIndex("index1", "doc", "1").setSource("{}", XContentType.JSON).get();
|
||||||
assertBusy(() -> assertThat(client().prepareSearch("index2").get().getHits().totalHits, equalTo(1L)));
|
assertBusy(() -> assertThat(client().prepareSearch("index2").get().getHits().totalHits, equalTo(1L)));
|
||||||
@ -883,7 +871,11 @@ public class ShardChangesIT extends ESIntegTestCase {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ResumeFollowAction.Request createFollowRequest(String leaderIndex, String followerIndex) {
|
public static PutFollowAction.Request follow(String leaderIndex, String followerIndex) {
|
||||||
|
return new PutFollowAction.Request(resumeFollow(leaderIndex, followerIndex));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ResumeFollowAction.Request resumeFollow(String leaderIndex, String followerIndex) {
|
||||||
ResumeFollowAction.Request request = new ResumeFollowAction.Request();
|
ResumeFollowAction.Request request = new ResumeFollowAction.Request();
|
||||||
request.setLeaderIndex(leaderIndex);
|
request.setLeaderIndex(leaderIndex);
|
||||||
request.setFollowerIndex(followerIndex);
|
request.setFollowerIndex(followerIndex);
|
||||||
|
@ -35,7 +35,7 @@ public class TransportResumeFollowActionTests extends ESTestCase {
|
|||||||
customMetaData.put(Ccr.CCR_CUSTOM_METADATA_LEADER_INDEX_SHARD_HISTORY_UUIDS, "uuid");
|
customMetaData.put(Ccr.CCR_CUSTOM_METADATA_LEADER_INDEX_SHARD_HISTORY_UUIDS, "uuid");
|
||||||
customMetaData.put(Ccr.CCR_CUSTOM_METADATA_LEADER_INDEX_UUID_KEY, "_na_");
|
customMetaData.put(Ccr.CCR_CUSTOM_METADATA_LEADER_INDEX_UUID_KEY, "_na_");
|
||||||
|
|
||||||
ResumeFollowAction.Request request = ShardChangesIT.createFollowRequest("index1", "index2");
|
ResumeFollowAction.Request request = ShardChangesIT.resumeFollow("index1", "index2");
|
||||||
String[] UUIDs = new String[]{"uuid"};
|
String[] UUIDs = new String[]{"uuid"};
|
||||||
{
|
{
|
||||||
// should fail, because leader index does not exist
|
// should fail, because leader index does not exist
|
||||||
|
Loading…
x
Reference in New Issue
Block a user