From 79b8541582ff617161192d9618b9251dd4149be4 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Thu, 15 Oct 2015 09:53:34 -0400 Subject: [PATCH] [test] Remove TestShardRouting This fixes jarhell issues running watcher tests in Eclipse but it requires that elasticsearch core export its copy of TestShardRouting in its test jar. Original commit: elastic/x-pack-elasticsearch@2a83d525532ab481d1c6b304ac515d89416de8e8 --- .../cluster/routing/TestShardRouting.java | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 watcher/src/test/java/org/elasticsearch/cluster/routing/TestShardRouting.java diff --git a/watcher/src/test/java/org/elasticsearch/cluster/routing/TestShardRouting.java b/watcher/src/test/java/org/elasticsearch/cluster/routing/TestShardRouting.java deleted file mode 100644 index ea24cb2ecdb..00000000000 --- a/watcher/src/test/java/org/elasticsearch/cluster/routing/TestShardRouting.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ -package org.elasticsearch.cluster.routing; - -/** - * A helper that allows to create shard routing instances within tests, while not requiring to expose - * different simplified constructors on the ShardRouting itself. - */ -public class TestShardRouting { - - public static ShardRouting newShardRouting(String index, int shardId, String currentNodeId, boolean primary, ShardRoutingState state, long version) { - return new ShardRouting(index, shardId, currentNodeId, null, null, primary, state, version, null, AllocationId.newInitializing(), true, ShardRouting.UNAVAILABLE_EXPECTED_SHARD_SIZE); - } - - public static ShardRouting newShardRouting(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, ShardRoutingState state, long version) { - return new ShardRouting(index, shardId, currentNodeId, relocatingNodeId, null, primary, state, version, null, AllocationId.newInitializing(), true, ShardRouting.UNAVAILABLE_EXPECTED_SHARD_SIZE); - } - - public static ShardRouting newShardRouting(String index, int shardId, String currentNodeId, String relocatingNodeId, RestoreSource restoreSource, boolean primary, ShardRoutingState state, long version) { - return new ShardRouting(index, shardId, currentNodeId, relocatingNodeId, restoreSource, primary, state, version, null, AllocationId.newInitializing(), true, ShardRouting.UNAVAILABLE_EXPECTED_SHARD_SIZE); - } - - public static ShardRouting newShardRouting(String index, int shardId, String currentNodeId, - String relocatingNodeId, RestoreSource restoreSource, boolean primary, ShardRoutingState state, long version, - UnassignedInfo unassignedInfo) { - return new ShardRouting(index, shardId, currentNodeId, relocatingNodeId, restoreSource, primary, state, version, unassignedInfo, AllocationId.newInitializing(), true, ShardRouting.UNAVAILABLE_EXPECTED_SHARD_SIZE); - } -}