Fix compile and unit test phase by disabling unit tests with direct groovy dependencies (temporary!)
See https://github.com/elastic/x-plugins/issues/724 Original commit: elastic/x-pack-elasticsearch@27862a76cb
This commit is contained in:
parent
9b4a2c906e
commit
15bb2581a0
|
@ -173,12 +173,6 @@
|
|||
<artifactId>commons-cli</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
<classifier>indy</classifier>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
package org.elasticsearch.watcher.actions;
|
||||
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.action.index.IndexResponse;
|
||||
import org.joda.time.DateTime;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
|
@ -35,6 +36,7 @@ import static org.hamcrest.Matchers.is;
|
|||
|
||||
/**
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class TimeThrottleIntegrationTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
private IndexResponse indexTestDoc() {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.actions.email;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
|
@ -18,6 +19,7 @@ import org.junit.After;
|
|||
import org.junit.Test;
|
||||
|
||||
import javax.mail.internet.MimeMessage;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
@ -35,6 +37,7 @@ import static org.hamcrest.Matchers.equalTo;
|
|||
|
||||
@TestLogging("subethamail:TRACE,watcher:TRACE")
|
||||
@ESIntegTestCase.ClusterScope(scope = SUITE, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false, numDataNodes = 1)
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class EmailActionIntegrationTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
static final String USERNAME = "_user";
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.actions.index;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.SearchType;
|
||||
|
@ -37,6 +38,7 @@ import static org.hamcrest.Matchers.*;
|
|||
/**
|
||||
*
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class IndexActionIntegrationTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
package org.elasticsearch.watcher.actions.webhook;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.ElasticsearchParseException;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
|
@ -40,6 +42,7 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
|
||||
import javax.mail.internet.AddressException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -57,6 +60,7 @@ import static org.mockito.Mockito.*;
|
|||
|
||||
/**
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class WebhookActionTests extends ESTestCase {
|
||||
|
||||
static final String TEST_HOST = "test.com";
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.condition.script;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.ShardSearchFailure;
|
||||
import org.elasticsearch.common.text.StringText;
|
||||
|
@ -32,6 +33,7 @@ import static org.mockito.Mockito.when;
|
|||
|
||||
/**
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class ScriptConditionSearchTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
private ThreadPool tp = null;
|
||||
|
|
|
@ -7,6 +7,8 @@ package org.elasticsearch.watcher.condition.script;
|
|||
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.ElasticsearchParseException;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.ShardSearchFailure;
|
||||
|
@ -41,6 +43,7 @@ import static org.hamcrest.Matchers.*;
|
|||
|
||||
/**
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class ScriptConditionTests extends ESTestCase {
|
||||
|
||||
ThreadPool tp = null;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.execution;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
|
@ -66,6 +67,7 @@ import static org.hamcrest.Matchers.not;
|
|||
import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.hamcrest.Matchers.startsWith;
|
||||
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class ManualExecutionTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.execution;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentFactory;
|
||||
|
@ -20,6 +21,7 @@ import static org.hamcrest.Matchers.equalTo;
|
|||
|
||||
/**
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class TriggeredWatchTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
package org.elasticsearch.watcher.history;
|
||||
|
||||
import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
|
||||
import org.elasticsearch.cluster.metadata.MappingMetaData;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenMap;
|
||||
|
@ -32,6 +34,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
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class HistoryTemplateTransformMappingsTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,6 +37,9 @@ import static org.elasticsearch.watcher.trigger.TriggerBuilders.schedule;
|
|||
import static org.elasticsearch.watcher.trigger.schedule.Schedules.interval;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class HttpInputIntegrationTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,7 +20,6 @@ import org.elasticsearch.env.Environment;
|
|||
import org.elasticsearch.script.ScriptContextRegistry;
|
||||
import org.elasticsearch.script.ScriptEngineService;
|
||||
import org.elasticsearch.script.ScriptService;
|
||||
import org.elasticsearch.script.groovy.GroovyScriptEngineService;
|
||||
import org.elasticsearch.search.builder.SearchSourceBuilder;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
|
@ -236,11 +235,9 @@ public final class WatcherTestUtils {
|
|||
.put("script.indexed", "on")
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
GroovyScriptEngineService groovyScriptEngineService = new GroovyScriptEngineService(settings);
|
||||
XMustacheScriptEngineService mustacheScriptEngineService = new XMustacheScriptEngineService(settings);
|
||||
Set<ScriptEngineService> engineServiceSet = new HashSet<>();
|
||||
engineServiceSet.add(mustacheScriptEngineService);
|
||||
engineServiceSet.add(groovyScriptEngineService);
|
||||
ScriptContextRegistry registry = new ScriptContextRegistry(Arrays.asList(ScriptServiceProxy.INSTANCE));
|
||||
|
||||
return ScriptServiceProxy.of(new ScriptService(settings, new Environment(settings), engineServiceSet, new ResourceWatcherService(settings, tp), registry));
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.test.integration;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.ElasticsearchParseException;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.action.search.SearchRequestBuilder;
|
||||
|
@ -55,6 +56,7 @@ import static org.hamcrest.Matchers.*;
|
|||
/**
|
||||
*/
|
||||
@TestLogging("watcher.trigger.schedule:TRACE")
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class BasicWatcherTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.test.integration;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.action.WriteConsistencyLevel;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
|
@ -49,6 +50,7 @@ import static org.hamcrest.core.IsEqual.equalTo;
|
|||
/**
|
||||
*/
|
||||
@TestLogging("watcher:TRACE")
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class BootStrapTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.test.integration;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.action.search.SearchRequestBuilder;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.common.util.Callback;
|
||||
|
@ -32,6 +33,7 @@ import static org.hamcrest.Matchers.notNullValue;
|
|||
|
||||
/**
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class ExecutionVarsIntegrationTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.test.integration;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.client.Client;
|
||||
|
@ -53,6 +54,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
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class NoMasterNodeTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
private ClusterDiscoveryConfiguration.UnicastZen config;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.test.integration;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.test.junit.annotations.TestLogging;
|
||||
|
@ -44,6 +45,7 @@ import static org.hamcrest.Matchers.greaterThan;
|
|||
/**
|
||||
*
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class WatchMetadataTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.transform;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.common.collect.MapBuilder;
|
||||
|
@ -38,6 +39,7 @@ import static org.hamcrest.Matchers.*;
|
|||
|
||||
/**
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class TransformIntegrationTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
package org.elasticsearch.watcher.transport.action.ack;
|
||||
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.delete.DeleteResponse;
|
||||
import org.elasticsearch.action.get.GetRequest;
|
||||
|
@ -45,6 +46,7 @@ import static org.hamcrest.core.IsEqual.equalTo;
|
|||
|
||||
/**
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class WatchAckTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
private IndexResponse indexTestDoc() {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.transport.action.delete;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.test.junit.annotations.TestLogging;
|
||||
import org.elasticsearch.watcher.support.Script;
|
||||
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTestCase;
|
||||
|
@ -23,6 +24,7 @@ import static org.hamcrest.Matchers.is;
|
|||
|
||||
/**
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class ForceDeleteWatchTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
//Disable time warping for the force delete long running watch test
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.transport.action.stats;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
|
@ -33,6 +34,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)
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class SlowWatchStatsTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.transport.action.stats;
|
||||
|
||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
|
||||
|
@ -38,6 +39,7 @@ import static org.hamcrest.core.IsEqual.equalTo;
|
|||
*/
|
||||
@ClusterScope(scope = TEST, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false)
|
||||
@TestLogging("watcher:TRACE")
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/x-plugins/issues/724")
|
||||
public class WatcherStatsTests extends AbstractWatcherIntegrationTestCase {
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue