28
28
import java .io .IOException ;
29
29
import java .util .HashMap ;
30
30
import java .util .Map ;
31
+ import java .util .concurrent .TimeUnit ;
31
32
32
33
import static java .util .Collections .singletonMap ;
33
34
import static org .elasticsearch .common .xcontent .XContentFactory .jsonBuilder ;
@@ -44,10 +45,10 @@ public class ChangePolicyforIndexIT extends ESRestTestCase {
44
45
* to rollover and a warm phase with an impossible allocation action. The
45
46
* second policy has a rollover action requiring 1000 document and a warm
46
47
* phase that moves the index to known nodes that will succeed. An index is
47
- * created with the fiorst policy set and the test ensures the policy is in
48
+ * created with the first policy set and the test ensures the policy is in
48
49
* the rollover step. It then changes the policy for the index to the second
49
50
* policy. It indexes a single document and checks that the index moves past
50
- * the hot phase and through the warm phasee (proving the hot phase
51
+ * the hot phase and through the warm phase (proving the hot phase
51
52
* definition from the first policy was used) and then checks the allocation
52
53
* settings from the second policy are set ont he index (proving the second
53
54
* policy was used for the warm phase)
@@ -112,7 +113,7 @@ public void testChangePolicyForIndex() throws Exception {
112
113
assertOK (client ().performRequest (request ));
113
114
114
115
// Check the index goes to the warm phase and completes
115
- assertBusy (() -> assertStep (indexName , TerminalPolicyStep .KEY ));
116
+ assertBusy (() -> assertStep (indexName , TerminalPolicyStep .KEY ), 30 , TimeUnit . SECONDS );
116
117
117
118
// Check index is allocated on integTest-1 and integTest-2 as per policy_2
118
119
Request getSettingsRequest = new Request ("GET" , "/" + indexName + "/_settings" );
0 commit comments