Skip to content

Commit

Permalink
Fix failing integ test
Browse files Browse the repository at this point in the history
Signed-off-by: Suraj Singh <[email protected]>
  • Loading branch information
dreamer-89 committed Dec 20, 2023
1 parent 46c530d commit 948ce3a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public void testReplicationTypesOverrideNotAllowed_WithTemplates() {
// Generate mutually exclusive replication strategies at cluster and index level
List<ReplicationType> replicationStrategies = getRandomReplicationTypesAsList();
ReplicationType clusterLevelReplication = replicationStrategies.get(0);
ReplicationType indexLevelReplication = replicationStrategies.get(1);
ReplicationType templateReplicationType = replicationStrategies.get(1);
Settings nodeSettings = Settings.builder()
.put(CLUSTER_SETTING_REPLICATION_TYPE, clusterLevelReplication)
.put(CLUSTER_INDEX_RESTRICT_REPLICATION_TYPE_SETTING.getKey(), true)
Expand All @@ -157,16 +157,16 @@ public void testReplicationTypesOverrideNotAllowed_WithTemplates() {
internalCluster().startDataOnlyNode(nodeSettings);
internalCluster().startDataOnlyNode(nodeSettings);
logger.info(
"--> Create index with index level replication {} and cluster level replication {}",
indexLevelReplication,
"--> Create index with template replication {} and cluster level replication {}",
templateReplicationType,
clusterLevelReplication
);
// Create index template
client().admin()
.indices()
.preparePutTemplate("template_1")
.setPatterns(Collections.singletonList("test-idx*"))
.setSettings(Settings.builder().put(indexSettings()).put(SETTING_REPLICATION_TYPE, ReplicationType.DOCUMENT).build())
.setSettings(Settings.builder().put(indexSettings()).put(SETTING_REPLICATION_TYPE, templateReplicationType).build())
.setOrder(0)
.get();

Expand Down

0 comments on commit 948ce3a

Please sign in to comment.