From 7609d5f82319b488ace9b9ae7611fc2d712b826e Mon Sep 17 00:00:00 2001 From: Brian Murphy Date: Tue, 21 Jul 2015 13:56:15 -0400 Subject: [PATCH] [TEST] Fix test compilation This fixes the WatchStoreTests and the TriggeredWatchStore tests with the new shard constructor. Original commit: elastic/x-pack-elasticsearch@3d1b00b132e818e482259e6d47999c9c4d794f7c --- .../watcher/execution/TriggeredWatchStoreTests.java | 10 +++++----- .../elasticsearch/watcher/watch/WatchStoreTests.java | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/watcher/src/test/java/org/elasticsearch/watcher/execution/TriggeredWatchStoreTests.java b/watcher/src/test/java/org/elasticsearch/watcher/execution/TriggeredWatchStoreTests.java index 7d88921184e..5e061d5e73f 100644 --- a/watcher/src/test/java/org/elasticsearch/watcher/execution/TriggeredWatchStoreTests.java +++ b/watcher/src/test/java/org/elasticsearch/watcher/execution/TriggeredWatchStoreTests.java @@ -92,7 +92,7 @@ public class TriggeredWatchStoreTests extends ElasticsearchTestCase { } else { state = ShardRoutingState.UNASSIGNED; } - indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(indexName, 0), false) + indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(indexName, 0)) .addShard(TestShardRouting.newShardRouting(indexName, 0, "_node_id", null, null, true, state, 1, new UnassignedInfo(UnassignedInfo.Reason.INDEX_CREATED, ""))) .build()); indexRoutingTableBuilder.addReplica(); @@ -127,7 +127,7 @@ public class TriggeredWatchStoreTests extends ElasticsearchTestCase { .build(); metaDateBuilder.put(IndexMetaData.builder(indexName).settings(settings).numberOfShards(1).numberOfReplicas(1)); IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(indexName); - indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(indexName, 0), false) + indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(indexName, 0)) .addShard(TestShardRouting.newShardRouting(indexName, 0, "_node_id", null, true, ShardRoutingState.STARTED, 1)) .build()); indexRoutingTableBuilder.addReplica(); @@ -162,7 +162,7 @@ public class TriggeredWatchStoreTests extends ElasticsearchTestCase { .build(); metaDateBuilder.put(IndexMetaData.builder(indexName).settings(settings).numberOfShards(1).numberOfReplicas(1)); IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(indexName); - indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(indexName, 0), false) + indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(indexName, 0)) .addShard(TestShardRouting.newShardRouting(indexName, 0, "_node_name", null, true, ShardRoutingState.STARTED, 1)) .build()); indexRoutingTableBuilder.addReplica(); @@ -206,7 +206,7 @@ public class TriggeredWatchStoreTests extends ElasticsearchTestCase { .build(); metaDateBuilder.put(IndexMetaData.builder(indexName).settings(settings).numberOfShards(1).numberOfReplicas(1)); IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(indexName); - indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(indexName, 0), false) + indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(indexName, 0)) .addShard(TestShardRouting.newShardRouting(indexName, 0, "_node_name", null, true, ShardRoutingState.STARTED, 1)) .build()); indexRoutingTableBuilder.addReplica(); @@ -249,7 +249,7 @@ public class TriggeredWatchStoreTests extends ElasticsearchTestCase { .build(); metaDateBuilder.put(IndexMetaData.builder(indexName).settings(settings).numberOfShards(1).numberOfReplicas(1)); IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(indexName); - indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(indexName, 0), false) + indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(indexName, 0)) .addShard(TestShardRouting.newShardRouting(indexName, 0, "_node_id", null, true, ShardRoutingState.STARTED, 1)) .build()); indexRoutingTableBuilder.addReplica(); diff --git a/watcher/src/test/java/org/elasticsearch/watcher/watch/WatchStoreTests.java b/watcher/src/test/java/org/elasticsearch/watcher/watch/WatchStoreTests.java index 1720a0ff4af..cfe06841406 100644 --- a/watcher/src/test/java/org/elasticsearch/watcher/watch/WatchStoreTests.java +++ b/watcher/src/test/java/org/elasticsearch/watcher/watch/WatchStoreTests.java @@ -80,7 +80,7 @@ public class WatchStoreTests extends ElasticsearchTestCase { .build(); metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1)); IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(WatchStore.INDEX); - indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(WatchStore.INDEX, 0), false) + indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(WatchStore.INDEX, 0)) .addShard(TestShardRouting.newShardRouting(WatchStore.INDEX, 0, "_node_id", null, null, true, ShardRoutingState.UNASSIGNED, 1, new UnassignedInfo(UnassignedInfo.Reason.INDEX_CREATED, ""))) .build()); indexRoutingTableBuilder.addReplica(); @@ -104,7 +104,7 @@ public class WatchStoreTests extends ElasticsearchTestCase { .build(); metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1)); IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(WatchStore.INDEX); - indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(WatchStore.INDEX, 0), false) + indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(WatchStore.INDEX, 0)) .addShard(TestShardRouting.newShardRouting(WatchStore.INDEX, 0, "_node_id", null, true, ShardRoutingState.STARTED, 1)) .build()); indexRoutingTableBuilder.addReplica(); @@ -139,7 +139,7 @@ public class WatchStoreTests extends ElasticsearchTestCase { .build(); metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1)); IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(WatchStore.INDEX); - indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(WatchStore.INDEX, 0), false) + indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(WatchStore.INDEX, 0)) .addShard(TestShardRouting.newShardRouting(WatchStore.INDEX, 0, "_node_id", null, true, ShardRoutingState.STARTED, 1)) .build()); indexRoutingTableBuilder.addReplica(); @@ -178,7 +178,7 @@ public class WatchStoreTests extends ElasticsearchTestCase { .build(); metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1)); IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(WatchStore.INDEX); - indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(WatchStore.INDEX, 0), false) + indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(WatchStore.INDEX, 0)) .addShard(TestShardRouting.newShardRouting(WatchStore.INDEX, 0, "_node_id", null, true, ShardRoutingState.STARTED, 1)) .build()); indexRoutingTableBuilder.addReplica(); @@ -215,7 +215,7 @@ public class WatchStoreTests extends ElasticsearchTestCase { .build(); metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1)); IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(WatchStore.INDEX); - indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(WatchStore.INDEX, 0), false) + indexRoutingTableBuilder.addIndexShard(new IndexShardRoutingTable.Builder(new ShardId(WatchStore.INDEX, 0)) .addShard(TestShardRouting.newShardRouting(WatchStore.INDEX, 0, "_node_id", null, true, ShardRoutingState.STARTED, 1)) .build()); indexRoutingTableBuilder.addReplica();