Wait for active license in CcrRestIT (#59543)

Relates #53966

Closes #59486
This commit is contained in:
Yannick Welsch 2020-07-15 09:37:34 +02:00
parent 96f52a028f
commit bc11503dc3
1 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.elasticsearch.xpack.ccr.action.ShardChangesAction;
import org.junit.After;
import org.junit.Before;
import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue;
@ -35,6 +36,11 @@ public class CcrRestIT extends ESClientYamlSuiteTestCase {
return Settings.builder().put(ThreadContext.PREFIX + ".Authorization", ccrUserAuthHeaderValue).build();
}
@Before
public void waitForRequirements() throws Exception {
ESRestTestCase.waitForActiveLicense(adminClient());
}
@After
public void cleanup() throws Exception {
ESRestTestCase.waitForPendingTasks(adminClient(), taskName -> taskName.startsWith(ShardChangesAction.NAME));