[TEST] allow test to start an additional node even if max number of random nodes is reached
relates elastic/x-pack-elasticsearch#2315
Original commit: elastic/x-pack-elasticsearch@3a91928528f015e39486e59a9c653ceffc5e6233
@@ -16,7 +16,6 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder;
-import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.SecurityIntegTestCase;
import org.elasticsearch.test.SecuritySettingsSource;
import org.elasticsearch.xpack.security.SecurityLifecycleService;
@@ -48,6 +47,12 @@ public class TokenAuthIntegTests extends SecurityIntegTestCase {
.build();
}
+ @Override
+ protected int maxNumberOfNodes() {
+ // we start one more node so we need to make sure if we hit max randomization we can still start one
+ return defaultMaxNumberOfNodes() + 1;
+ }
+
public void testTokenServiceBootstrapOnNodeJoin() throws Exception {
final Client client = internalClient();
SecurityClient securityClient = new SecurityClient(client);
