31
31
import java .util .Arrays ;
32
32
import java .util .Collections ;
33
33
import java .util .List ;
34
+ import java .util .concurrent .TimeUnit ;
34
35
35
36
import static org .elasticsearch .test .hamcrest .ElasticsearchAssertions .assertAcked ;
36
37
import static org .hamcrest .Matchers .equalTo ;
@@ -149,7 +150,7 @@ public void testAutoFollowManyIndices() throws Exception {
149
150
AutoFollowMetadata autoFollowMetadata = metaData [0 ].custom (AutoFollowMetadata .TYPE );
150
151
assertThat (autoFollowMetadata .getFollowedLeaderIndexUUIDs ().get ("my-pattern" ), hasSize ((int ) expectedVal1 ));
151
152
assertThat (autoFollowStats [0 ].getNumberOfSuccessfulFollowIndices (), equalTo (expectedVal1 ));
152
- });
153
+ }, 30 , TimeUnit . SECONDS );
153
154
} catch (AssertionError ae ) {
154
155
logger .warn ("indices={}" , Arrays .toString (metaData [0 ].indices ().keys ().toArray (String .class )));
155
156
logger .warn ("auto follow stats={}" , Strings .toString (autoFollowStats [0 ]));
@@ -168,7 +169,7 @@ public void testAutoFollowManyIndices() throws Exception {
168
169
AutoFollowMetadata autoFollowMetadata = metaData [0 ].custom (AutoFollowMetadata .TYPE );
169
170
assertThat (autoFollowMetadata .getFollowedLeaderIndexUUIDs ().get ("my-pattern" ), nullValue ());
170
171
assertThat (autoFollowStats [0 ].getAutoFollowedClusters ().size (), equalTo (0 ));
171
- });
172
+ }, 30 , TimeUnit . SECONDS );
172
173
} catch (AssertionError ae ) {
173
174
logger .warn ("indices={}" , Arrays .toString (metaData [0 ].indices ().keys ().toArray (String .class )));
174
175
logger .warn ("auto follow stats={}" , Strings .toString (autoFollowStats [0 ]));
@@ -199,7 +200,7 @@ public void testAutoFollowManyIndices() throws Exception {
199
200
// Ensure that there are no auto follow errors:
200
201
// (added specifically to see that there are no leader indices auto followed multiple times)
201
202
assertThat (autoFollowStats [0 ].getRecentAutoFollowErrors ().size (), equalTo (0 ));
202
- });
203
+ }, 30 , TimeUnit . SECONDS );
203
204
} catch (AssertionError ae ) {
204
205
logger .warn ("indices={}" , Arrays .toString (metaData [0 ].indices ().keys ().toArray (String .class )));
205
206
logger .warn ("auto follow stats={}" , Strings .toString (autoFollowStats [0 ]));
0 commit comments