[TEST] Fix test compilation
This fixes the WatchStoreTests and the TriggeredWatchStore tests with the new shard constructor. Original commit: elastic/x-pack-elasticsearch@3d1b00b132
This commit is contained in:
parent
cc7fe390eb
commit
7609d5f823
|
@ -92,7 +92,7 @@ public class TriggeredWatchStoreTests extends ElasticsearchTestCase {
|
||||||
} else {
|
} else {
|
||||||
state = ShardRoutingState.UNASSIGNED;
|
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, "")))
|
.addShard(TestShardRouting.newShardRouting(indexName, 0, "_node_id", null, null, true, state, 1, new UnassignedInfo(UnassignedInfo.Reason.INDEX_CREATED, "")))
|
||||||
.build());
|
.build());
|
||||||
indexRoutingTableBuilder.addReplica();
|
indexRoutingTableBuilder.addReplica();
|
||||||
|
@ -127,7 +127,7 @@ public class TriggeredWatchStoreTests extends ElasticsearchTestCase {
|
||||||
.build();
|
.build();
|
||||||
metaDateBuilder.put(IndexMetaData.builder(indexName).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
metaDateBuilder.put(IndexMetaData.builder(indexName).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
||||||
IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(indexName);
|
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))
|
.addShard(TestShardRouting.newShardRouting(indexName, 0, "_node_id", null, true, ShardRoutingState.STARTED, 1))
|
||||||
.build());
|
.build());
|
||||||
indexRoutingTableBuilder.addReplica();
|
indexRoutingTableBuilder.addReplica();
|
||||||
|
@ -162,7 +162,7 @@ public class TriggeredWatchStoreTests extends ElasticsearchTestCase {
|
||||||
.build();
|
.build();
|
||||||
metaDateBuilder.put(IndexMetaData.builder(indexName).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
metaDateBuilder.put(IndexMetaData.builder(indexName).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
||||||
IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(indexName);
|
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))
|
.addShard(TestShardRouting.newShardRouting(indexName, 0, "_node_name", null, true, ShardRoutingState.STARTED, 1))
|
||||||
.build());
|
.build());
|
||||||
indexRoutingTableBuilder.addReplica();
|
indexRoutingTableBuilder.addReplica();
|
||||||
|
@ -206,7 +206,7 @@ public class TriggeredWatchStoreTests extends ElasticsearchTestCase {
|
||||||
.build();
|
.build();
|
||||||
metaDateBuilder.put(IndexMetaData.builder(indexName).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
metaDateBuilder.put(IndexMetaData.builder(indexName).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
||||||
IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(indexName);
|
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))
|
.addShard(TestShardRouting.newShardRouting(indexName, 0, "_node_name", null, true, ShardRoutingState.STARTED, 1))
|
||||||
.build());
|
.build());
|
||||||
indexRoutingTableBuilder.addReplica();
|
indexRoutingTableBuilder.addReplica();
|
||||||
|
@ -249,7 +249,7 @@ public class TriggeredWatchStoreTests extends ElasticsearchTestCase {
|
||||||
.build();
|
.build();
|
||||||
metaDateBuilder.put(IndexMetaData.builder(indexName).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
metaDateBuilder.put(IndexMetaData.builder(indexName).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
||||||
IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(indexName);
|
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))
|
.addShard(TestShardRouting.newShardRouting(indexName, 0, "_node_id", null, true, ShardRoutingState.STARTED, 1))
|
||||||
.build());
|
.build());
|
||||||
indexRoutingTableBuilder.addReplica();
|
indexRoutingTableBuilder.addReplica();
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class WatchStoreTests extends ElasticsearchTestCase {
|
||||||
.build();
|
.build();
|
||||||
metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
||||||
IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(WatchStore.INDEX);
|
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, "")))
|
.addShard(TestShardRouting.newShardRouting(WatchStore.INDEX, 0, "_node_id", null, null, true, ShardRoutingState.UNASSIGNED, 1, new UnassignedInfo(UnassignedInfo.Reason.INDEX_CREATED, "")))
|
||||||
.build());
|
.build());
|
||||||
indexRoutingTableBuilder.addReplica();
|
indexRoutingTableBuilder.addReplica();
|
||||||
|
@ -104,7 +104,7 @@ public class WatchStoreTests extends ElasticsearchTestCase {
|
||||||
.build();
|
.build();
|
||||||
metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
||||||
IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(WatchStore.INDEX);
|
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))
|
.addShard(TestShardRouting.newShardRouting(WatchStore.INDEX, 0, "_node_id", null, true, ShardRoutingState.STARTED, 1))
|
||||||
.build());
|
.build());
|
||||||
indexRoutingTableBuilder.addReplica();
|
indexRoutingTableBuilder.addReplica();
|
||||||
|
@ -139,7 +139,7 @@ public class WatchStoreTests extends ElasticsearchTestCase {
|
||||||
.build();
|
.build();
|
||||||
metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
||||||
IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(WatchStore.INDEX);
|
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))
|
.addShard(TestShardRouting.newShardRouting(WatchStore.INDEX, 0, "_node_id", null, true, ShardRoutingState.STARTED, 1))
|
||||||
.build());
|
.build());
|
||||||
indexRoutingTableBuilder.addReplica();
|
indexRoutingTableBuilder.addReplica();
|
||||||
|
@ -178,7 +178,7 @@ public class WatchStoreTests extends ElasticsearchTestCase {
|
||||||
.build();
|
.build();
|
||||||
metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
||||||
IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(WatchStore.INDEX);
|
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))
|
.addShard(TestShardRouting.newShardRouting(WatchStore.INDEX, 0, "_node_id", null, true, ShardRoutingState.STARTED, 1))
|
||||||
.build());
|
.build());
|
||||||
indexRoutingTableBuilder.addReplica();
|
indexRoutingTableBuilder.addReplica();
|
||||||
|
@ -215,7 +215,7 @@ public class WatchStoreTests extends ElasticsearchTestCase {
|
||||||
.build();
|
.build();
|
||||||
metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
metaDateBuilder.put(IndexMetaData.builder(WatchStore.INDEX).settings(settings).numberOfShards(1).numberOfReplicas(1));
|
||||||
IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(WatchStore.INDEX);
|
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))
|
.addShard(TestShardRouting.newShardRouting(WatchStore.INDEX, 0, "_node_id", null, true, ShardRoutingState.STARTED, 1))
|
||||||
.build());
|
.build());
|
||||||
indexRoutingTableBuilder.addReplica();
|
indexRoutingTableBuilder.addReplica();
|
||||||
|
|
Loading…
Reference in New Issue