This commit is contained in:
Tal Levy 2018-09-05 13:21:50 -07:00
parent b5f7fb6882
commit 023e1bf889
1 changed files with 2 additions and 1 deletions

View File

@ -554,7 +554,8 @@ public class IndexLifecycleRunnerTests extends ESTestCase {
public void testMoveClusterStateToNextStep() { public void testMoveClusterStateToNextStep() {
String indexName = "my_index"; String indexName = "my_index";
LifecyclePolicy policy = LifecyclePolicyTests.randomTestLifecyclePolicy("policy"); LifecyclePolicy policy = randomValueOtherThanMany(p -> p.getPhases().size() == 0,
() -> LifecyclePolicyTests.randomTestLifecyclePolicy("policy"));
Phase nextPhase = policy.getPhases().values().stream().findFirst().get(); Phase nextPhase = policy.getPhases().values().stream().findFirst().get();
List<LifecyclePolicyMetadata> policyMetadatas = Collections.singletonList( List<LifecyclePolicyMetadata> policyMetadatas = Collections.singletonList(
new LifecyclePolicyMetadata(policy, Collections.emptyMap())); new LifecyclePolicyMetadata(policy, Collections.emptyMap()));