[TEST] Ensure the license is enabled when starting watcher
This change adds a check to make sure that the license is enabled when starting watcher in the tests. This avoids a race-condition where a test might run before the license manager had a chance to start. Original commit: elastic/x-pack-elasticsearch@0b9d0da5d4
This commit is contained in:
parent
54926ec336
commit
7c1497ae3b
|
@ -188,6 +188,7 @@ public abstract class AbstractWatcherIntegrationTests extends ElasticsearchInteg
|
|||
|
||||
private void startWatcherIfNodesExist() throws Exception {
|
||||
if (internalTestCluster().size() > 0) {
|
||||
ensureLicenseEnabled();
|
||||
WatcherStatsResponse response = watcherClient().prepareWatcherStats().get();
|
||||
if (response.getWatcherState() == WatcherState.STOPPED) {
|
||||
logger.info("[{}#{}]: starting watcher", getTestClass().getSimpleName(), getTestName());
|
||||
|
|
Loading…
Reference in New Issue