1111import org .elasticsearch .cluster .ClusterState ;
1212import org .elasticsearch .cluster .metadata .IndexMetadata ;
1313import org .elasticsearch .cluster .metadata .Metadata ;
14- import org .elasticsearch .common .TriConsumer ;
1514import org .elasticsearch .index .IndexVersion ;
1615import org .elasticsearch .xpack .core .ilm .Step .StepKey ;
1716
1817import java .util .concurrent .CountDownLatch ;
1918import java .util .concurrent .TimeUnit ;
19+ import java .util .function .BiConsumer ;
2020
2121import static org .hamcrest .Matchers .equalTo ;
2222
@@ -34,15 +34,15 @@ public void testPredicateNextStepChange() throws InterruptedException {
3434 StepKey nextStepKey = new StepKey (randomAlphaOfLength (6 ), randomAlphaOfLength (6 ), BranchingStep .NAME );
3535 StepKey nextSkipKey = new StepKey (randomAlphaOfLength (7 ), randomAlphaOfLength (7 ), BranchingStep .NAME );
3636 {
37- AsyncBranchingStep step = new AsyncBranchingStep (stepKey , nextStepKey , nextSkipKey , (i , c , l ) -> l .onResponse (true ), client );
37+ AsyncBranchingStep step = new AsyncBranchingStep (stepKey , nextStepKey , nextSkipKey , (i , l ) -> l .onResponse (true ), client );
3838 expectThrows (IllegalStateException .class , step ::getNextStepKey );
3939 CountDownLatch latch = new CountDownLatch (1 );
4040 step .performAction (state .metadata ().getProject ().index (indexName ), state , null , new Listener (latch ));
4141 assertTrue (latch .await (5 , TimeUnit .SECONDS ));
4242 assertThat (step .getNextStepKey (), equalTo (step .getNextStepKeyOnTrue ()));
4343 }
4444 {
45- AsyncBranchingStep step = new AsyncBranchingStep (stepKey , nextStepKey , nextSkipKey , (i , c , l ) -> l .onResponse (false ), client );
45+ AsyncBranchingStep step = new AsyncBranchingStep (stepKey , nextStepKey , nextSkipKey , (i , l ) -> l .onResponse (false ), client );
4646 expectThrows (IllegalStateException .class , step ::getNextStepKey );
4747 CountDownLatch latch = new CountDownLatch (1 );
4848 step .performAction (state .metadata ().getProject ().index (indexName ), state , null , new Listener (latch ));
@@ -56,15 +56,15 @@ public AsyncBranchingStep createRandomInstance() {
5656 StepKey stepKey = new StepKey (randomAlphaOfLength (5 ), randomAlphaOfLength (5 ), BranchingStep .NAME );
5757 StepKey nextStepKey = new StepKey (randomAlphaOfLength (6 ), randomAlphaOfLength (6 ), BranchingStep .NAME );
5858 StepKey nextSkipKey = new StepKey (randomAlphaOfLength (7 ), randomAlphaOfLength (7 ), BranchingStep .NAME );
59- return new AsyncBranchingStep (stepKey , nextStepKey , nextSkipKey , (i , c , l ) -> l .onResponse (randomBoolean ()), client );
59+ return new AsyncBranchingStep (stepKey , nextStepKey , nextSkipKey , (i , l ) -> l .onResponse (randomBoolean ()), client );
6060 }
6161
6262 @ Override
6363 public AsyncBranchingStep mutateInstance (AsyncBranchingStep instance ) {
6464 StepKey key = instance .getKey ();
6565 StepKey nextStepKey = instance .getNextStepKeyOnFalse ();
6666 StepKey nextSkipStepKey = instance .getNextStepKeyOnTrue ();
67- TriConsumer <IndexMetadata , ClusterState , ActionListener <Boolean >> asyncPredicate = instance .getAsyncPredicate ();
67+ BiConsumer <IndexMetadata , ActionListener <Boolean >> asyncPredicate = instance .getAsyncPredicate ();
6868
6969 switch (between (0 , 2 )) {
7070 case 0 -> key = new StepKey (key .phase (), key .action (), key .name () + randomAlphaOfLength (5 ));
0 commit comments