@@ -140,7 +140,8 @@ public void testWithdrawsVoteFromANode() throws InterruptedException {
140140
141141 clusterStateObserver .waitForNextChange (new AdjustConfigurationForExclusions ());
142142 transportService .sendRequest (localNode , AddVotingConfigExclusionsAction .NAME ,
143- new AddVotingConfigExclusionsRequest (new String []{"other1" }),
143+ new AddVotingConfigExclusionsRequest (Strings .EMPTY_ARRAY , Strings .EMPTY_ARRAY ,
144+ new String []{"other1" }, TimeValue .timeValueSeconds (30 )),
144145 expectSuccess (r -> {
145146 assertNotNull (r );
146147 countDownLatch .countDown ();
@@ -149,15 +150,15 @@ public void testWithdrawsVoteFromANode() throws InterruptedException {
149150
150151 assertTrue (countDownLatch .await (30 , TimeUnit .SECONDS ));
151152 assertThat (clusterService .getClusterApplierService ().state ().getVotingConfigExclusions (), contains (otherNode1Exclusion ));
152- assertWarnings (AddVotingConfigExclusionsRequest .DEPRECATION_MESSAGE );
153153 }
154154
155155 public void testWithdrawsVotesFromMultipleNodes () throws InterruptedException {
156156 final CountDownLatch countDownLatch = new CountDownLatch (1 );
157157
158158 clusterStateObserver .waitForNextChange (new AdjustConfigurationForExclusions ());
159159 transportService .sendRequest (localNode , AddVotingConfigExclusionsAction .NAME ,
160- new AddVotingConfigExclusionsRequest (new String []{"other1" , "other2" }),
160+ new AddVotingConfigExclusionsRequest (Strings .EMPTY_ARRAY , Strings .EMPTY_ARRAY ,
161+ new String []{"other1" , "other2" }, TimeValue .timeValueSeconds (30 )),
161162 expectSuccess (r -> {
162163 assertNotNull (r );
163164 countDownLatch .countDown ();
@@ -167,15 +168,15 @@ public void testWithdrawsVotesFromMultipleNodes() throws InterruptedException {
167168 assertTrue (countDownLatch .await (30 , TimeUnit .SECONDS ));
168169 assertThat (clusterService .getClusterApplierService ().state ().getVotingConfigExclusions (),
169170 containsInAnyOrder (otherNode1Exclusion , otherNode2Exclusion ));
170- assertWarnings (AddVotingConfigExclusionsRequest .DEPRECATION_MESSAGE );
171171 }
172172
173173 public void testWithdrawsVotesFromNodesMatchingWildcard () throws InterruptedException {
174174 final CountDownLatch countDownLatch = new CountDownLatch (1 );
175175
176176 clusterStateObserver .waitForNextChange (new AdjustConfigurationForExclusions ());
177177 transportService .sendRequest (localNode , AddVotingConfigExclusionsAction .NAME ,
178- new AddVotingConfigExclusionsRequest (new String []{"other*" }),
178+ new AddVotingConfigExclusionsRequest (new String []{"other*" }, Strings .EMPTY_ARRAY ,
179+ Strings .EMPTY_ARRAY , TimeValue .timeValueSeconds (30 )),
179180 expectSuccess (r -> {
180181 assertNotNull (r );
181182 countDownLatch .countDown ();
@@ -193,7 +194,8 @@ public void testWithdrawsVotesFromAllMasterEligibleNodes() throws InterruptedExc
193194
194195 clusterStateObserver .waitForNextChange (new AdjustConfigurationForExclusions ());
195196 transportService .sendRequest (localNode , AddVotingConfigExclusionsAction .NAME ,
196- new AddVotingConfigExclusionsRequest (new String []{"_all" }),
197+ new AddVotingConfigExclusionsRequest (new String []{"_all" }, Strings .EMPTY_ARRAY ,
198+ Strings .EMPTY_ARRAY , TimeValue .timeValueSeconds (30 )),
197199 expectSuccess (r -> {
198200 assertNotNull (r );
199201 countDownLatch .countDown ();
@@ -211,7 +213,8 @@ public void testWithdrawsVoteFromLocalNode() throws InterruptedException {
211213
212214 clusterStateObserver .waitForNextChange (new AdjustConfigurationForExclusions ());
213215 transportService .sendRequest (localNode , AddVotingConfigExclusionsAction .NAME ,
214- new AddVotingConfigExclusionsRequest (new String []{"_local" }),
216+ new AddVotingConfigExclusionsRequest (new String []{"_local" }, Strings .EMPTY_ARRAY ,
217+ Strings .EMPTY_ARRAY , TimeValue .timeValueSeconds (30 )),
215218 expectSuccess (r -> {
216219 assertNotNull (r );
217220 countDownLatch .countDown ();
@@ -236,7 +239,7 @@ public void testReturnsImmediatelyIfVoteAlreadyWithdrawn() throws InterruptedExc
236239
237240 // no observer to reconfigure
238241 transportService .sendRequest (localNode , AddVotingConfigExclusionsAction .NAME ,
239- new AddVotingConfigExclusionsRequest (new String []{"other1" }, Strings . EMPTY_ARRAY , Strings . EMPTY_ARRAY , TimeValue .ZERO ),
242+ new AddVotingConfigExclusionsRequest (Strings . EMPTY_ARRAY , Strings . EMPTY_ARRAY , new String []{"other1" }, TimeValue .ZERO ),
240243 expectSuccess (r -> {
241244 assertNotNull (r );
242245 countDownLatch .countDown ();
@@ -246,15 +249,15 @@ public void testReturnsImmediatelyIfVoteAlreadyWithdrawn() throws InterruptedExc
246249 assertTrue (countDownLatch .await (30 , TimeUnit .SECONDS ));
247250 assertThat (clusterService .getClusterApplierService ().state ().getVotingConfigExclusions (),
248251 contains (otherNode1Exclusion ));
249- assertWarnings (AddVotingConfigExclusionsRequest .DEPRECATION_MESSAGE );
250252 }
251253
252- public void testReturnsErrorIfNoMatchingNodes () throws InterruptedException {
254+ public void testReturnsErrorIfNoMatchingNodesWithDeprecatedNodeDescriptions () throws InterruptedException {
253255 final CountDownLatch countDownLatch = new CountDownLatch (1 );
254256 final SetOnce <TransportException > exceptionHolder = new SetOnce <>();
255257
256258 transportService .sendRequest (localNode , AddVotingConfigExclusionsAction .NAME ,
257- new AddVotingConfigExclusionsRequest (new String []{"not-a-node" }),
259+ new AddVotingConfigExclusionsRequest (new String []{"not-a-node" }, Strings .EMPTY_ARRAY , Strings .EMPTY_ARRAY ,
260+ TimeValue .timeValueSeconds (30 )),
258261 expectError (e -> {
259262 exceptionHolder .set (e );
260263 countDownLatch .countDown ();
@@ -274,7 +277,8 @@ public void testOnlyMatchesMasterEligibleNodes() throws InterruptedException {
274277 final SetOnce <TransportException > exceptionHolder = new SetOnce <>();
275278
276279 transportService .sendRequest (localNode , AddVotingConfigExclusionsAction .NAME ,
277- new AddVotingConfigExclusionsRequest (new String []{"_all" , "master:false" }),
280+ new AddVotingConfigExclusionsRequest (new String []{"_all" , "master:false" }, Strings .EMPTY_ARRAY ,
281+ Strings .EMPTY_ARRAY , TimeValue .timeValueSeconds (30 )),
278282 expectError (e -> {
279283 exceptionHolder .set (e );
280284 countDownLatch .countDown ();
@@ -372,7 +376,8 @@ public void testSucceedsEvenIfAllExclusionsAlreadyAdded() throws InterruptedExce
372376 final CountDownLatch countDownLatch = new CountDownLatch (1 );
373377
374378 transportService .sendRequest (localNode , AddVotingConfigExclusionsAction .NAME ,
375- new AddVotingConfigExclusionsRequest (new String []{"other1" }),
379+ new AddVotingConfigExclusionsRequest (Strings .EMPTY_ARRAY , Strings .EMPTY_ARRAY ,
380+ new String []{"other1" }, TimeValue .timeValueSeconds (30 )),
376381 expectSuccess (r -> {
377382 assertNotNull (r );
378383 countDownLatch .countDown ();
@@ -382,7 +387,6 @@ public void testSucceedsEvenIfAllExclusionsAlreadyAdded() throws InterruptedExce
382387 assertTrue (countDownLatch .await (30 , TimeUnit .SECONDS ));
383388 assertThat (clusterService .getClusterApplierService ().state ().getVotingConfigExclusions (),
384389 contains (otherNode1Exclusion ));
385- assertWarnings (AddVotingConfigExclusionsRequest .DEPRECATION_MESSAGE );
386390 }
387391
388392 public void testExcludeByNodeIdSucceedsEvenIfAllExclusionsAlreadyAdded () throws InterruptedException {
@@ -464,7 +468,8 @@ public void testReturnsErrorIfMaximumExclusionCountExceeded() throws Interrupted
464468 final SetOnce <TransportException > exceptionHolder = new SetOnce <>();
465469
466470 transportService .sendRequest (localNode , AddVotingConfigExclusionsAction .NAME ,
467- new AddVotingConfigExclusionsRequest (new String []{"other*" }),
471+ new AddVotingConfigExclusionsRequest (new String []{"other*" }, Strings .EMPTY_ARRAY ,
472+ Strings .EMPTY_ARRAY , TimeValue .timeValueSeconds (30 )),
468473 expectError (e -> {
469474 exceptionHolder .set (e );
470475 countDownLatch .countDown ();
0 commit comments