Skip to content

Commit

Permalink
Wait for active license in CcrRestIT (#59543)
Browse files Browse the repository at this point in the history
Relates #53966

Closes #59486
  • Loading branch information
ywelsch committed Jul 15, 2020
1 parent 00bf386 commit 9daf2d3
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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;

Expand All @@ -35,6 +36,11 @@ protected Settings restClientSettings() {
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));
Expand Down

0 comments on commit 9daf2d3

Please sign in to comment.