Skip to content

Commit

Permalink
[TEST] Use different name for remote cluster connection
Browse files Browse the repository at this point in the history
To avoid collisions with other tests.
  • Loading branch information
martijnvg committed Dec 5, 2018
1 parent 4620959 commit 3d85e8c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ public void setupRemoteClusterConfig() throws Exception {
String transportAddress = (String) nodesResponse.get("transport_address");

ClusterUpdateSettingsRequest updateSettingsRequest = new ClusterUpdateSettingsRequest();
updateSettingsRequest.transientSettings(Collections.singletonMap("cluster.remote.local.seeds", transportAddress));
updateSettingsRequest.transientSettings(Collections.singletonMap("cluster.remote.local_cluster.seeds", transportAddress));
ClusterUpdateSettingsResponse updateSettingsResponse =
highLevelClient().cluster().putSettings(updateSettingsRequest, RequestOptions.DEFAULT);
assertThat(updateSettingsResponse.isAcknowledged(), is(true));

assertBusy(() -> {
Map<?, ?> localConnection = (Map<?, ?>) toMap(client()
.performRequest(new Request("GET", "/_remote/info")))
.get("local");
.get("local_cluster");
assertThat(localConnection, notNullValue());
assertThat(localConnection.get("connected"), is(true));
});
Expand All @@ -91,7 +91,7 @@ public void testIndexFollowing() throws Exception {
CreateIndexResponse response = highLevelClient().indices().create(createIndexRequest, RequestOptions.DEFAULT);
assertThat(response.isAcknowledged(), is(true));

PutFollowRequest putFollowRequest = new PutFollowRequest("local", "leader", "follower");
PutFollowRequest putFollowRequest = new PutFollowRequest("local_cluster", "leader", "follower");
PutFollowResponse putFollowResponse = execute(putFollowRequest, ccrClient::putFollow, ccrClient::putFollowAsync);
assertThat(putFollowResponse.isFollowIndexCreated(), is(true));
assertThat(putFollowResponse.isFollowIndexShardsAcked(), is(true));
Expand Down Expand Up @@ -165,7 +165,7 @@ public void testIndexFollowing() throws Exception {
public void testAutoFollowing() throws Exception {
CcrClient ccrClient = highLevelClient().ccr();
PutAutoFollowPatternRequest putAutoFollowPatternRequest =
new PutAutoFollowPatternRequest("pattern1", "local", Collections.singletonList("logs-*"));
new PutAutoFollowPatternRequest("pattern1", "local_cluster", Collections.singletonList("logs-*"));
putAutoFollowPatternRequest.setFollowIndexNamePattern("copy-{{leader_index}}");
AcknowledgedResponse putAutoFollowPatternResponse =
execute(putAutoFollowPatternRequest, ccrClient::putAutoFollowPattern, ccrClient::putAutoFollowPatternAsync);
Expand Down

0 comments on commit 3d85e8c

Please sign in to comment.