Fix naming for abstract test cases

Original commit: elastic/x-pack-elasticsearch@546ac98077
This commit is contained in:
Areek Zillur 2015-09-02 16:58:06 -04:00
parent e4ffceb9ba
commit dc471bc0a9
48 changed files with 95 additions and 107 deletions

View File

@ -27,7 +27,7 @@ import static org.hamcrest.Matchers.*;
/**
* a helper class that contains a couple of HTTP helper methods
*/
public abstract class AbstractPrivilegeTests extends ShieldIntegTestCase {
public abstract class AbstractPrivilegeTestCase extends ShieldIntegTestCase {
protected static final String USERS_PASSWD_HASHED = new String(Hasher.BCRYPT.hash(new SecuredString("passwd".toCharArray())));

View File

@ -24,7 +24,7 @@ import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST;
@ClusterScope(scope = TEST)
public class ClusterPrivilegeTests extends AbstractPrivilegeTests {
public class ClusterPrivilegeTests extends AbstractPrivilegeTestCase {
public static final String ROLES =
"role_a:\n" +

View File

@ -17,7 +17,7 @@ import java.util.Locale;
import static org.hamcrest.Matchers.is;
public class IndexPrivilegeTests extends AbstractPrivilegeTests {
public class IndexPrivilegeTests extends AbstractPrivilegeTestCase {
private String jsonDoc = "{ \"name\" : \"elasticsearch\"}";

View File

@ -16,7 +16,7 @@ import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.watcher.execution.WatchExecutionContext;
import org.elasticsearch.watcher.support.xcontent.XContentSource;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.get.GetWatchResponse;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.elasticsearch.watcher.watch.Payload;
@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.is;
/**
*
*/
public class ActionErrorIntegrationTests extends AbstractWatcherIntegrationTests {
public class ActionErrorIntegrationTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean timeWarped() {

View File

@ -13,7 +13,7 @@ import org.elasticsearch.watcher.client.WatcherClient;
import org.elasticsearch.watcher.execution.ExecutionState;
import org.elasticsearch.watcher.history.HistoryStore;
import org.elasticsearch.watcher.history.WatchRecord;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.joda.time.DateTimeZone;
import org.junit.Test;
@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.is;
/**
*/
public class TimeThrottleIntegrationTests extends AbstractWatcherIntegrationTests {
public class TimeThrottleIntegrationTests extends AbstractWatcherIntegrationTestCase {
private IndexResponse indexTestDoc() {
createIndex("actions", "events");

View File

@ -7,11 +7,10 @@ package org.elasticsearch.watcher.actions.email;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.watcher.actions.email.service.EmailTemplate;
import org.elasticsearch.watcher.actions.email.service.support.EmailServer;
import org.elasticsearch.watcher.client.WatcherClient;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.trigger.schedule.IntervalSchedule;
import org.junit.After;
import org.junit.Test;
@ -34,7 +33,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
public class EmailActionIntegrationTests extends AbstractWatcherIntegrationTests {
public class EmailActionIntegrationTests extends AbstractWatcherIntegrationTestCase {
static final String USERNAME = "_user";
static final String PASSWORD = "_passwd";

View File

@ -8,7 +8,6 @@ package org.elasticsearch.watcher.actions.email;
import org.elasticsearch.action.get.GetResponse;
import org.joda.time.DateTime;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.support.XContentMapValues;
import org.elasticsearch.watcher.actions.email.service.EmailTemplate;
import org.elasticsearch.watcher.actions.email.service.support.EmailServer;
@ -17,7 +16,7 @@ import org.elasticsearch.watcher.execution.ActionExecutionMode;
import org.elasticsearch.watcher.shield.ShieldSecretService;
import org.elasticsearch.watcher.support.secret.SecretService;
import org.elasticsearch.watcher.support.xcontent.XContentSource;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.execute.ExecuteWatchResponse;
import org.elasticsearch.watcher.transport.actions.get.GetWatchResponse;
import org.elasticsearch.watcher.trigger.TriggerEvent;
@ -43,7 +42,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
public class EmailSecretsIntegrationTests extends AbstractWatcherIntegrationTests {
public class EmailSecretsIntegrationTests extends AbstractWatcherIntegrationTestCase {
static final String USERNAME = "_user";
static final String PASSWORD = "_passwd";

View File

@ -9,7 +9,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.test.junit.annotations.Network;
import org.elasticsearch.watcher.actions.hipchat.HipChatAction;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.Test;
@ -28,7 +28,7 @@ import static org.hamcrest.Matchers.*;
*
*/
@Network
public class HipChatServiceTests extends AbstractWatcherIntegrationTests {
public class HipChatServiceTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean timeWarped() {

View File

@ -14,7 +14,7 @@ import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.sort.SortOrder;
import org.elasticsearch.watcher.history.HistoryStore;
import org.elasticsearch.watcher.support.WatcherDateTimeUtils;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.execute.ExecuteWatchResponse;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.elasticsearch.watcher.trigger.schedule.ScheduleTriggerEvent;
@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
public class IndexActionIntegrationTests extends AbstractWatcherIntegrationTests {
public class IndexActionIntegrationTests extends AbstractWatcherIntegrationTestCase {
@Test
public void testSimple() throws Exception {

View File

@ -11,7 +11,7 @@ import org.elasticsearch.test.junit.annotations.Network;
import org.elasticsearch.watcher.actions.slack.SlackAction;
import org.elasticsearch.watcher.actions.slack.service.message.Attachment;
import org.elasticsearch.watcher.actions.slack.service.message.SlackMessage;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.Test;
@ -30,7 +30,7 @@ import static org.hamcrest.Matchers.*;
*
*/
@Network
public class SlackServiceTests extends AbstractWatcherIntegrationTests {
public class SlackServiceTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean timeWarped() {

View File

@ -23,7 +23,7 @@ import org.elasticsearch.watcher.support.clock.SystemClock;
import org.elasticsearch.watcher.support.http.HttpRequestTemplate;
import org.elasticsearch.watcher.support.text.TextTemplate;
import org.elasticsearch.watcher.support.xcontent.ObjectPath;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.execute.ExecuteWatchResponse;
import org.elasticsearch.watcher.transport.actions.get.GetWatchRequest;
import org.elasticsearch.watcher.transport.actions.put.PutWatchRequest;
@ -50,7 +50,7 @@ import static org.elasticsearch.watcher.trigger.schedule.Schedules.interval;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
public class ActionThrottleTests extends AbstractWatcherIntegrationTests {
public class ActionThrottleTests extends AbstractWatcherIntegrationTestCase {
@Test
public void testSingleActionAckThrottle() throws Exception {

View File

@ -23,7 +23,7 @@ import org.elasticsearch.watcher.support.http.Scheme;
import org.elasticsearch.watcher.support.http.auth.basic.BasicAuth;
import org.elasticsearch.watcher.support.text.TextTemplate;
import org.elasticsearch.watcher.support.xcontent.XContentSource;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
public class WebhookHttpsIntegrationTests extends AbstractWatcherIntegrationTests {
public class WebhookHttpsIntegrationTests extends AbstractWatcherIntegrationTestCase {
private int webPort;
private MockWebServer webServer;

View File

@ -21,7 +21,7 @@ import org.elasticsearch.watcher.support.http.HttpRequestTemplate;
import org.elasticsearch.watcher.support.http.auth.basic.BasicAuth;
import org.elasticsearch.watcher.support.text.TextTemplate;
import org.elasticsearch.watcher.support.xcontent.XContentSource;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
public class WebhookIntegrationTests extends AbstractWatcherIntegrationTests {
public class WebhookIntegrationTests extends AbstractWatcherIntegrationTestCase {
private int webPort;
private MockWebServer webServer;

View File

@ -17,7 +17,7 @@ import org.elasticsearch.search.internal.InternalSearchHits;
import org.elasticsearch.search.internal.InternalSearchResponse;
import org.elasticsearch.watcher.execution.WatchExecutionContext;
import org.elasticsearch.watcher.support.clock.SystemClock;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.watch.Payload;
import org.junit.Test;
@ -29,7 +29,7 @@ import static org.mockito.Mockito.when;
/**
*/
public class CompareConditionSearchTests extends AbstractWatcherIntegrationTests {
public class CompareConditionSearchTests extends AbstractWatcherIntegrationTestCase {
@Test
public void testExecute_withAggs() throws Exception {

View File

@ -19,7 +19,7 @@ import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.watcher.execution.WatchExecutionContext;
import org.elasticsearch.watcher.support.Script;
import org.elasticsearch.watcher.support.init.proxy.ScriptServiceProxy;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.test.WatcherTestUtils;
import org.elasticsearch.watcher.watch.Payload;
import org.junit.After;
@ -32,7 +32,7 @@ import static org.mockito.Mockito.when;
/**
*/
public class ScriptConditionSearchTests extends AbstractWatcherIntegrationTests {
public class ScriptConditionSearchTests extends AbstractWatcherIntegrationTestCase {
private ThreadPool tp = null;
private ScriptServiceProxy scriptService;

View File

@ -21,7 +21,7 @@ import org.elasticsearch.watcher.input.simple.SimpleInput;
import org.elasticsearch.watcher.support.Script;
import org.elasticsearch.watcher.support.clock.SystemClock;
import org.elasticsearch.watcher.support.xcontent.ObjectPath;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.delete.DeleteWatchResponse;
import org.elasticsearch.watcher.transport.actions.execute.ExecuteWatchRequest;
import org.elasticsearch.watcher.transport.actions.execute.ExecuteWatchRequestBuilder;
@ -66,7 +66,7 @@ import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.startsWith;
public class ManualExecutionTests extends AbstractWatcherIntegrationTests {
public class ManualExecutionTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean enableShield() {

View File

@ -11,7 +11,7 @@ import org.joda.time.DateTime;
import org.elasticsearch.watcher.condition.ExecutableCondition;
import org.elasticsearch.watcher.condition.always.ExecutableAlwaysCondition;
import org.elasticsearch.watcher.input.none.ExecutableNoneInput;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.trigger.schedule.ScheduleTriggerEvent;
import org.elasticsearch.watcher.watch.Watch;
import org.joda.time.DateTimeZone;
@ -23,7 +23,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
public class TriggeredWatchStoreLifeCycleTests extends AbstractWatcherIntegrationTests {
public class TriggeredWatchStoreLifeCycleTests extends AbstractWatcherIntegrationTestCase {
@Test
public void testPutLoadUpdate() throws Exception {

View File

@ -8,7 +8,7 @@ package org.elasticsearch.watcher.execution;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.test.WatcherTestUtils;
import org.elasticsearch.watcher.trigger.schedule.ScheduleTriggerEvent;
import org.elasticsearch.watcher.watch.Watch;
@ -20,7 +20,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
public class TriggeredWatchTests extends AbstractWatcherIntegrationTests {
public class TriggeredWatchTests extends AbstractWatcherIntegrationTestCase {
@Test
public void testParser() throws Exception {

View File

@ -10,7 +10,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.watcher.WatcherModule;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.junit.Test;
import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST;
@ -23,7 +23,7 @@ import static org.hamcrest.core.Is.is;
*/
@TestLogging("cluster:DEBUG,action.admin.cluster.settings:DEBUG,watcher:DEBUG")
@ESIntegTestCase.ClusterScope(scope = TEST, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false, numDataNodes = 1)
public class HistoryStoreSettingsTests extends AbstractWatcherIntegrationTests {
public class HistoryStoreSettingsTests extends AbstractWatcherIntegrationTestCase {
@Test
public void testChangeSettings() throws Exception {

View File

@ -7,13 +7,12 @@ package org.elasticsearch.watcher.history;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.search.aggregations.Aggregations;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.watcher.actions.email.service.EmailTemplate;
import org.elasticsearch.watcher.actions.email.service.support.EmailServer;
import org.elasticsearch.watcher.execution.ExecutionState;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.After;
import org.junit.Test;
@ -33,7 +32,7 @@ import static org.hamcrest.Matchers.notNullValue;
* This test makes sure that the email address fields in the watch_record action result are
* not analyzed so they can be used in aggregations
*/
public class HistoryTemplateEmailMappingsTests extends AbstractWatcherIntegrationTests {
public class HistoryTemplateEmailMappingsTests extends AbstractWatcherIntegrationTestCase {
static final String USERNAME = "_user";
static final String PASSWORD = "_passwd";

View File

@ -13,9 +13,8 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.search.aggregations.Aggregations;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.watcher.execution.ExecutionState;
import org.elasticsearch.watcher.history.HistoryStore;
import org.elasticsearch.watcher.support.http.HttpRequestTemplate;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.After;
import org.junit.Before;
@ -38,7 +37,7 @@ import static org.hamcrest.Matchers.notNullValue;
* This test makes sure that the http host and path fields in the watch_record action result are
* not analyzed so they can be used in aggregations
*/
public class HistoryTemplateHttpMappingsTests extends AbstractWatcherIntegrationTests {
public class HistoryTemplateHttpMappingsTests extends AbstractWatcherIntegrationTestCase {
private int webPort;
private MockWebServer webServer;

View File

@ -9,8 +9,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.search.aggregations.Aggregations;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.watcher.execution.ExecutionState;
import org.elasticsearch.watcher.history.HistoryStore;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.Test;
@ -27,7 +26,7 @@ import static org.hamcrest.Matchers.notNullValue;
* This test makes sure that the index action response `index` and `type` fields in the watch_record action result are
* not analyzed so they can be used in aggregations
*/
public class HistoryTemplateIndexActionMappingsTests extends AbstractWatcherIntegrationTests {
public class HistoryTemplateIndexActionMappingsTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean timeWarped() {

View File

@ -11,8 +11,7 @@ import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.search.aggregations.Aggregations;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.watcher.execution.ExecutionState;
import org.elasticsearch.watcher.history.HistoryStore;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.Test;
@ -32,7 +31,7 @@ import static org.hamcrest.Matchers.notNullValue;
* This test makes sure that the http host and path fields in the watch_record action result are
* not analyzed so they can be used in aggregations
*/
public class HistoryTemplateSearchInputMappingsTests extends AbstractWatcherIntegrationTests {
public class HistoryTemplateSearchInputMappingsTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean timeWarped() {

View File

@ -10,7 +10,7 @@ import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.watcher.execution.ExecutionState;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.Test;
@ -30,7 +30,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
* This test makes sure that the different time fields in the watch_record are mapped as date types
*/
public class HistoryTemplateTimeMappingsTests extends AbstractWatcherIntegrationTests {
public class HistoryTemplateTimeMappingsTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean timeWarped() {

View File

@ -10,7 +10,7 @@ import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.watcher.execution.ExecutionState;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.Test;
@ -32,7 +32,7 @@ import static org.hamcrest.Matchers.notNullValue;
* This test makes sure that the http host and path fields in the watch_record action result are
* not analyzed so they can be used in aggregations
*/
public class HistoryTemplateTransformMappingsTests extends AbstractWatcherIntegrationTests {
public class HistoryTemplateTransformMappingsTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean timeWarped() {

View File

@ -17,7 +17,7 @@ import org.elasticsearch.watcher.support.http.HttpRequestTemplate;
import org.elasticsearch.watcher.support.http.auth.basic.BasicAuth;
import org.elasticsearch.watcher.support.text.TextTemplate;
import org.elasticsearch.watcher.support.xcontent.XContentSource;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.elasticsearch.watcher.trigger.schedule.IntervalSchedule;
import org.junit.Test;
@ -37,7 +37,7 @@ import static org.elasticsearch.watcher.trigger.TriggerBuilders.schedule;
import static org.elasticsearch.watcher.trigger.schedule.Schedules.interval;
import static org.hamcrest.Matchers.equalTo;
public class HttpInputIntegrationTests extends AbstractWatcherIntegrationTests {
public class HttpInputIntegrationTests extends AbstractWatcherIntegrationTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {

View File

@ -7,7 +7,6 @@ package org.elasticsearch.watcher.license;
import com.carrotsearch.randomizedtesting.RandomizedTest;
import com.carrotsearch.randomizedtesting.SysGlobals;
import com.google.common.collect.ImmutableSet;
import org.elasticsearch.ElasticsearchSecurityException;
import org.elasticsearch.common.component.AbstractComponent;
import org.elasticsearch.common.inject.AbstractModule;
@ -21,7 +20,7 @@ import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.watcher.actions.ActionStatus;
import org.elasticsearch.watcher.history.HistoryStore;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.get.GetWatchResponse;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.elasticsearch.watcher.transport.actions.service.WatcherServiceResponse;
@ -44,7 +43,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
public class LicenseIntegrationTests extends AbstractWatcherIntegrationTests {
public class LicenseIntegrationTests extends AbstractWatcherIntegrationTestCase {
static final License DUMMY_LICENSE = License.builder()
.feature(LicenseService.FEATURE_NAME)

View File

@ -6,12 +6,9 @@
package org.elasticsearch.watcher.shield;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.PluginsService;
import org.elasticsearch.shield.ShieldPlugin;
import org.elasticsearch.shield.authc.support.SecuredString;
import org.elasticsearch.watcher.WatcherPlugin;
import org.elasticsearch.watcher.WatcherState;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.delete.DeleteWatchResponse;
import org.elasticsearch.watcher.transport.actions.execute.ExecuteWatchResponse;
import org.elasticsearch.watcher.transport.actions.get.GetWatchResponse;
@ -31,7 +28,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.core.Is.is;
import static org.joda.time.DateTimeZone.UTC;
public class BasicShieldTests extends AbstractWatcherIntegrationTests {
public class BasicShieldTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean enableShield() {

View File

@ -10,7 +10,7 @@ import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.util.Callback;
import org.elasticsearch.watcher.client.WatcherClient;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.elasticsearch.watcher.trigger.schedule.IntervalSchedule;
import org.joda.time.format.DateTimeFormat;
@ -32,7 +32,7 @@ import static org.hamcrest.Matchers.is;
/**
*/
public class DynamicIndexNameIntegrationTests extends AbstractWatcherIntegrationTests {
public class DynamicIndexNameIntegrationTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean timeWarped() {

View File

@ -9,7 +9,7 @@ import org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesResp
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.watcher.WatcherModule;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.junit.Test;
import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST;
@ -20,7 +20,7 @@ import static org.hamcrest.core.Is.is;
/**
*/
@ESIntegTestCase.ClusterScope(scope = TEST, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false, numDataNodes = 1)
public class WatcherIndexTemplateRegistryTests extends AbstractWatcherIntegrationTests {
public class WatcherIndexTemplateRegistryTests extends AbstractWatcherIntegrationTestCase {
@Test
public void testTemplates() throws Exception {

View File

@ -81,7 +81,7 @@ import static org.hamcrest.core.IsNot.not;
/**
*/
@ClusterScope(scope = SUITE, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false, maxNumDataNodes = 3)
public abstract class AbstractWatcherIntegrationTests extends ESIntegTestCase {
public abstract class AbstractWatcherIntegrationTestCase extends ESIntegTestCase {
private static final boolean timeWarpEnabled = SystemPropertyUtil.getBoolean("tests.timewarp", true);
@ -287,7 +287,7 @@ public abstract class AbstractWatcherIntegrationTests extends ESIntegTestCase {
return getInstanceFromMaster(TriggerService.class);
}
public AbstractWatcherIntegrationTests() {
public AbstractWatcherIntegrationTestCase() {
super();
}

View File

@ -23,7 +23,7 @@ import org.elasticsearch.watcher.support.WatcherUtils;
import org.elasticsearch.watcher.support.clock.SystemClock;
import org.elasticsearch.watcher.support.text.TextTemplate;
import org.elasticsearch.watcher.support.xcontent.XContentSource;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.delete.DeleteWatchResponse;
import org.elasticsearch.watcher.transport.actions.get.GetWatchResponse;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
@ -55,7 +55,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
@TestLogging("watcher.trigger.schedule:TRACE")
public class BasicWatcherTests extends AbstractWatcherIntegrationTests {
public class BasicWatcherTests extends AbstractWatcherIntegrationTestCase {
@Test
public void testIndexWatch() throws Exception {

View File

@ -20,7 +20,7 @@ import org.elasticsearch.watcher.execution.TriggeredWatch;
import org.elasticsearch.watcher.execution.TriggeredWatchStore;
import org.elasticsearch.watcher.execution.Wid;
import org.elasticsearch.watcher.history.*;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.stats.WatcherStatsResponse;
import org.elasticsearch.watcher.trigger.schedule.ScheduleTriggerEvent;
import org.elasticsearch.watcher.watch.Watch;
@ -49,7 +49,7 @@ import static org.hamcrest.core.IsEqual.equalTo;
/**
*/
@TestLogging("watcher:TRACE")
public class BootStrapTests extends AbstractWatcherIntegrationTests {
public class BootStrapTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean timeWarped() {

View File

@ -5,14 +5,13 @@
*/
package org.elasticsearch.watcher.test.integration;
import com.carrotsearch.randomizedtesting.annotations.Repeat;
import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.util.Callback;
import org.elasticsearch.watcher.client.WatcherClient;
import org.elasticsearch.watcher.support.xcontent.ObjectPath;
import org.elasticsearch.watcher.support.xcontent.XContentSource;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.execute.ExecuteWatchResponse;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.Test;
@ -33,7 +32,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*/
public class ExecutionVarsIntegrationTests extends AbstractWatcherIntegrationTests {
public class ExecutionVarsIntegrationTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean timeWarped() {

View File

@ -20,7 +20,7 @@ import org.elasticsearch.watcher.support.http.auth.basic.ApplicableBasicAuth;
import org.elasticsearch.watcher.support.http.auth.basic.BasicAuth;
import org.elasticsearch.watcher.support.secret.SecretService;
import org.elasticsearch.watcher.support.xcontent.XContentSource;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.execute.ExecuteWatchResponse;
import org.elasticsearch.watcher.transport.actions.get.GetWatchResponse;
import org.elasticsearch.watcher.trigger.TriggerEvent;
@ -49,7 +49,7 @@ import static org.joda.time.DateTimeZone.UTC;
/**
*
*/
public class HttpSecretsIntegrationTests extends AbstractWatcherIntegrationTests {
public class HttpSecretsIntegrationTests extends AbstractWatcherIntegrationTestCase {
static final String USERNAME = "_user";
static final String PASSWORD = "_passwd";

View File

@ -27,7 +27,7 @@ import org.elasticsearch.watcher.client.WatchSourceBuilder;
import org.elasticsearch.watcher.client.WatchSourceBuilders;
import org.elasticsearch.watcher.condition.ConditionBuilders;
import org.elasticsearch.watcher.execution.ExecutionService;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.test.WatcherTestUtils;
import org.elasticsearch.watcher.transport.actions.delete.DeleteWatchResponse;
import org.elasticsearch.watcher.transport.actions.stats.WatcherStatsResponse;
@ -53,7 +53,7 @@ import static org.hamcrest.core.Is.is;
@TestLogging("discovery:TRACE,watcher:TRACE")
@ClusterScope(scope = TEST, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false, numDataNodes = 0)
@SuppressLocalMode
public class NoMasterNodeTests extends AbstractWatcherIntegrationTests {
public class NoMasterNodeTests extends AbstractWatcherIntegrationTestCase {
private ClusterDiscoveryConfiguration.UnicastZen config;

View File

@ -14,7 +14,7 @@ import org.elasticsearch.watcher.execution.ActionExecutionMode;
import org.elasticsearch.watcher.history.HistoryStore;
import org.elasticsearch.watcher.support.text.TextTemplate;
import org.elasticsearch.watcher.support.xcontent.ObjectPath;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.test.WatcherTestUtils;
import org.elasticsearch.watcher.transport.actions.execute.ExecuteWatchResponse;
import org.elasticsearch.watcher.trigger.TriggerEvent;
@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.greaterThan;
/**
*
*/
public class WatchMetadataTests extends AbstractWatcherIntegrationTests {
public class WatchMetadataTests extends AbstractWatcherIntegrationTestCase {
@Test
public void testWatchMetadata() throws Exception {

View File

@ -15,7 +15,7 @@ import org.elasticsearch.node.Node;
import org.elasticsearch.shield.authc.support.SecuredString;
import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
import org.elasticsearch.test.rest.client.http.HttpResponse;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.junit.After;
import org.junit.Test;
@ -24,15 +24,15 @@ import java.util.Map;
import static org.elasticsearch.shield.authc.support.UsernamePasswordToken.BASIC_AUTH_HEADER;
import static org.elasticsearch.shield.authc.support.UsernamePasswordToken.basicAuthHeaderValue;
import static org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests.ShieldSettings.TEST_PASSWORD;
import static org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests.ShieldSettings.TEST_USERNAME;
import static org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase.ShieldSettings.TEST_PASSWORD;
import static org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase.ShieldSettings.TEST_USERNAME;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.Matchers.is;
/**
*
*/
public class WatcherSettingsFilterTests extends AbstractWatcherIntegrationTests {
public class WatcherSettingsFilterTests extends AbstractWatcherIntegrationTestCase {
private CloseableHttpClient httpClient = HttpClients.createDefault();

View File

@ -11,7 +11,7 @@ import org.elasticsearch.common.collect.MapBuilder;
import org.elasticsearch.common.io.Streams;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.watcher.support.Script;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.test.WatcherTestUtils;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.Test;
@ -19,7 +19,6 @@ import org.junit.Test;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
@ -39,7 +38,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
public class TransformIntegrationTests extends AbstractWatcherIntegrationTests {
public class TransformIntegrationTests extends AbstractWatcherIntegrationTestCase {
@Override
public Settings nodeSettings(int nodeOrdinal) {

View File

@ -17,7 +17,7 @@ import org.elasticsearch.watcher.client.WatcherClient;
import org.elasticsearch.watcher.execution.ExecutionState;
import org.elasticsearch.watcher.history.HistoryStore;
import org.elasticsearch.watcher.history.WatchRecord;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.ack.AckWatchRequestBuilder;
import org.elasticsearch.watcher.transport.actions.ack.AckWatchResponse;
import org.elasticsearch.watcher.transport.actions.get.GetWatchRequest;
@ -45,7 +45,7 @@ import static org.hamcrest.core.IsEqual.equalTo;
/**
*/
public class WatchAckTests extends AbstractWatcherIntegrationTests {
public class WatchAckTests extends AbstractWatcherIntegrationTestCase {
private IndexResponse indexTestDoc() {
createIndex("actions", "events");

View File

@ -6,7 +6,7 @@
package org.elasticsearch.watcher.transport.action.delete;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.delete.DeleteWatchRequest;
import org.elasticsearch.watcher.transport.actions.delete.DeleteWatchResponse;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
@ -24,7 +24,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
public class DeleteWatchTests extends AbstractWatcherIntegrationTests {
public class DeleteWatchTests extends AbstractWatcherIntegrationTestCase {
@Test
public void testDelete() throws Exception {

View File

@ -7,7 +7,7 @@ package org.elasticsearch.watcher.transport.action.delete;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.watcher.support.Script;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.delete.DeleteWatchResponse;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.elasticsearch.watcher.transport.actions.service.WatcherServiceResponse;
@ -23,7 +23,7 @@ import static org.hamcrest.Matchers.is;
/**
*/
public class ForceDeleteWatchTests extends AbstractWatcherIntegrationTests {
public class ForceDeleteWatchTests extends AbstractWatcherIntegrationTestCase {
//Disable time warping for the force delete long running watch test
protected boolean timeWarped() {

View File

@ -16,7 +16,7 @@ import org.elasticsearch.watcher.execution.ActionExecutionMode;
import org.elasticsearch.watcher.execution.Wid;
import org.elasticsearch.watcher.support.WatcherDateTimeUtils;
import org.elasticsearch.watcher.support.xcontent.XContentSource;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.ack.AckWatchRequestBuilder;
import org.elasticsearch.watcher.transport.actions.ack.AckWatchResponse;
import org.elasticsearch.watcher.transport.actions.execute.ExecuteWatchRequestBuilder;
@ -45,7 +45,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
public class ExecuteWatchTests extends AbstractWatcherIntegrationTests {
public class ExecuteWatchTests extends AbstractWatcherIntegrationTestCase {
@Test(expected = ActionRequestValidationException.class)

View File

@ -11,7 +11,7 @@ import org.elasticsearch.watcher.client.WatcherClient;
import org.elasticsearch.watcher.execution.Wid;
import org.elasticsearch.watcher.support.WatcherDateTimeUtils;
import org.elasticsearch.watcher.support.xcontent.XContentSource;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.execute.ExecuteWatchResponse;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.Test;
@ -28,7 +28,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
public class ExecuteWatchWithDateMathTests extends AbstractWatcherIntegrationTests {
public class ExecuteWatchWithDateMathTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean timeWarped() {

View File

@ -7,7 +7,7 @@ package org.elasticsearch.watcher.transport.action.get;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.watcher.support.xcontent.XContentSource;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.get.GetWatchRequest;
import org.elasticsearch.watcher.transport.actions.get.GetWatchResponse;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
@ -27,7 +27,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
public class GetWatchTests extends AbstractWatcherIntegrationTests {
public class GetWatchTests extends AbstractWatcherIntegrationTestCase {
@Test
public void testGet() throws Exception {

View File

@ -9,7 +9,7 @@ package org.elasticsearch.watcher.transport.action.put;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.watcher.client.WatchSourceBuilder;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
import org.junit.Test;
@ -25,7 +25,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
public class PutWatchTests extends AbstractWatcherIntegrationTests {
public class PutWatchTests extends AbstractWatcherIntegrationTestCase {
@Test

View File

@ -14,7 +14,7 @@ import org.elasticsearch.watcher.condition.ConditionBuilders;
import org.elasticsearch.watcher.execution.ExecutionPhase;
import org.elasticsearch.watcher.execution.QueuedWatch;
import org.elasticsearch.watcher.input.InputBuilders;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.transport.actions.stats.WatcherStatsResponse;
import org.joda.time.DateTime;
import org.junit.Test;
@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
@ESIntegTestCase.ClusterScope(scope = TEST, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false, numDataNodes = 2)
public class SlowWatchStatsTests extends AbstractWatcherIntegrationTests {
public class SlowWatchStatsTests extends AbstractWatcherIntegrationTestCase {
@Override
protected boolean timeWarped() {

View File

@ -13,7 +13,7 @@ import org.elasticsearch.watcher.WatcherBuild;
import org.elasticsearch.watcher.WatcherState;
import org.elasticsearch.watcher.client.WatcherClient;
import org.elasticsearch.watcher.condition.ConditionBuilders;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
import org.elasticsearch.watcher.test.WatcherTestUtils;
import org.elasticsearch.watcher.transport.actions.delete.DeleteWatchResponse;
import org.elasticsearch.watcher.transport.actions.stats.WatcherStatsRequest;
@ -38,7 +38,7 @@ import static org.hamcrest.core.IsEqual.equalTo;
*/
@ClusterScope(scope = TEST, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false)
@TestLogging("watcher:TRACE")
public class WatcherStatsTests extends AbstractWatcherIntegrationTests {
public class WatcherStatsTests extends AbstractWatcherIntegrationTestCase {
@Test
public void testStartedStats() throws Exception {