|
@@ -93,9 +93,10 @@ public class BasicEnrichTests extends ESSingleNodeTestCase {
|
|
|
MATCH_FIELD,
|
|
|
List.of(DECORATE_FIELDS)
|
|
|
);
|
|
|
- PutEnrichPolicyAction.Request request = new PutEnrichPolicyAction.Request(policyName, enrichPolicy);
|
|
|
+ PutEnrichPolicyAction.Request request = new PutEnrichPolicyAction.Request(TEST_REQUEST_TIMEOUT, policyName, enrichPolicy);
|
|
|
client().execute(PutEnrichPolicyAction.INSTANCE, request).actionGet();
|
|
|
- client().execute(ExecuteEnrichPolicyAction.INSTANCE, new ExecuteEnrichPolicyAction.Request(policyName)).actionGet();
|
|
|
+ client().execute(ExecuteEnrichPolicyAction.INSTANCE, new ExecuteEnrichPolicyAction.Request(TEST_REQUEST_TIMEOUT, policyName))
|
|
|
+ .actionGet();
|
|
|
|
|
|
String pipelineName = "my-pipeline";
|
|
|
String pipelineBody = Strings.format("""
|
|
@@ -146,8 +147,10 @@ public class BasicEnrichTests extends ESSingleNodeTestCase {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- EnrichStatsAction.Response statsResponse = client().execute(EnrichStatsAction.INSTANCE, new EnrichStatsAction.Request())
|
|
|
- .actionGet();
|
|
|
+ EnrichStatsAction.Response statsResponse = client().execute(
|
|
|
+ EnrichStatsAction.INSTANCE,
|
|
|
+ new EnrichStatsAction.Request(TEST_REQUEST_TIMEOUT)
|
|
|
+ ).actionGet();
|
|
|
assertThat(statsResponse.getCoordinatorStats().size(), equalTo(1));
|
|
|
String localNodeId = getInstanceFromNode(ClusterService.class).localNode().getId();
|
|
|
assertThat(statsResponse.getCoordinatorStats().get(0).nodeId(), equalTo(localNodeId));
|
|
@@ -186,9 +189,10 @@ public class BasicEnrichTests extends ESSingleNodeTestCase {
|
|
|
matchField,
|
|
|
List.of(enrichField)
|
|
|
);
|
|
|
- PutEnrichPolicyAction.Request request = new PutEnrichPolicyAction.Request(policyName, enrichPolicy);
|
|
|
+ PutEnrichPolicyAction.Request request = new PutEnrichPolicyAction.Request(TEST_REQUEST_TIMEOUT, policyName, enrichPolicy);
|
|
|
client().execute(PutEnrichPolicyAction.INSTANCE, request).actionGet();
|
|
|
- client().execute(ExecuteEnrichPolicyAction.INSTANCE, new ExecuteEnrichPolicyAction.Request(policyName)).actionGet();
|
|
|
+ client().execute(ExecuteEnrichPolicyAction.INSTANCE, new ExecuteEnrichPolicyAction.Request(TEST_REQUEST_TIMEOUT, policyName))
|
|
|
+ .actionGet();
|
|
|
|
|
|
String pipelineName = "my-pipeline";
|
|
|
String pipelineBody = Strings.format("""
|
|
@@ -226,8 +230,10 @@ public class BasicEnrichTests extends ESSingleNodeTestCase {
|
|
|
assertThat(entries.containsKey(matchField), is(true));
|
|
|
assertThat(entries.get(enrichField), equalTo("94040"));
|
|
|
|
|
|
- EnrichStatsAction.Response statsResponse = client().execute(EnrichStatsAction.INSTANCE, new EnrichStatsAction.Request())
|
|
|
- .actionGet();
|
|
|
+ EnrichStatsAction.Response statsResponse = client().execute(
|
|
|
+ EnrichStatsAction.INSTANCE,
|
|
|
+ new EnrichStatsAction.Request(TEST_REQUEST_TIMEOUT)
|
|
|
+ ).actionGet();
|
|
|
assertThat(statsResponse.getCoordinatorStats().size(), equalTo(1));
|
|
|
String localNodeId = getInstanceFromNode(ClusterService.class).localNode().getId();
|
|
|
assertThat(statsResponse.getCoordinatorStats().get(0).nodeId(), equalTo(localNodeId));
|
|
@@ -246,9 +252,10 @@ public class BasicEnrichTests extends ESSingleNodeTestCase {
|
|
|
client().admin().indices().refresh(new RefreshRequest("source-" + i)).actionGet();
|
|
|
|
|
|
EnrichPolicy enrichPolicy = new EnrichPolicy(EnrichPolicy.MATCH_TYPE, null, List.of("source-" + i), "key", List.of("value"));
|
|
|
- PutEnrichPolicyAction.Request request = new PutEnrichPolicyAction.Request(policyName, enrichPolicy);
|
|
|
+ PutEnrichPolicyAction.Request request = new PutEnrichPolicyAction.Request(TEST_REQUEST_TIMEOUT, policyName, enrichPolicy);
|
|
|
client().execute(PutEnrichPolicyAction.INSTANCE, request).actionGet();
|
|
|
- client().execute(ExecuteEnrichPolicyAction.INSTANCE, new ExecuteEnrichPolicyAction.Request(policyName)).actionGet();
|
|
|
+ client().execute(ExecuteEnrichPolicyAction.INSTANCE, new ExecuteEnrichPolicyAction.Request(TEST_REQUEST_TIMEOUT, policyName))
|
|
|
+ .actionGet();
|
|
|
|
|
|
String pipelineName = "pipeline" + i;
|
|
|
String pipelineBody = Strings.format("""
|
|
@@ -290,11 +297,11 @@ public class BasicEnrichTests extends ESSingleNodeTestCase {
|
|
|
}
|
|
|
|
|
|
EnrichPolicy enrichPolicy = new EnrichPolicy(EnrichPolicy.MATCH_TYPE, null, List.of(sourceIndexName), "key", List.of("value"));
|
|
|
- PutEnrichPolicyAction.Request request = new PutEnrichPolicyAction.Request(policyName, enrichPolicy);
|
|
|
+ PutEnrichPolicyAction.Request request = new PutEnrichPolicyAction.Request(TEST_REQUEST_TIMEOUT, policyName, enrichPolicy);
|
|
|
client().execute(PutEnrichPolicyAction.INSTANCE, request).actionGet();
|
|
|
ExecuteEnrichPolicyAction.Response executeResponse = client().execute(
|
|
|
ExecuteEnrichPolicyAction.INSTANCE,
|
|
|
- new ExecuteEnrichPolicyAction.Request(policyName).setWaitForCompletion(false)
|
|
|
+ new ExecuteEnrichPolicyAction.Request(TEST_REQUEST_TIMEOUT, policyName).setWaitForCompletion(false)
|
|
|
).actionGet();
|
|
|
|
|
|
assertThat(executeResponse.getStatus(), is(nullValue()));
|
|
@@ -346,9 +353,10 @@ public class BasicEnrichTests extends ESSingleNodeTestCase {
|
|
|
MATCH_FIELD,
|
|
|
List.of(DECORATE_FIELDS)
|
|
|
);
|
|
|
- PutEnrichPolicyAction.Request request = new PutEnrichPolicyAction.Request(policyName, enrichPolicy);
|
|
|
+ PutEnrichPolicyAction.Request request = new PutEnrichPolicyAction.Request(TEST_REQUEST_TIMEOUT, policyName, enrichPolicy);
|
|
|
client().execute(PutEnrichPolicyAction.INSTANCE, request).actionGet();
|
|
|
- client().execute(ExecuteEnrichPolicyAction.INSTANCE, new ExecuteEnrichPolicyAction.Request(policyName)).actionGet();
|
|
|
+ client().execute(ExecuteEnrichPolicyAction.INSTANCE, new ExecuteEnrichPolicyAction.Request(TEST_REQUEST_TIMEOUT, policyName))
|
|
|
+ .actionGet();
|
|
|
|
|
|
String pipelineName = "my-pipeline";
|
|
|
String pipelineBody = Strings.format(
|
|
@@ -384,9 +392,10 @@ public class BasicEnrichTests extends ESSingleNodeTestCase {
|
|
|
MATCH_FIELD,
|
|
|
Arrays.asList(DECORATE_FIELDS)
|
|
|
);
|
|
|
- PutEnrichPolicyAction.Request request = new PutEnrichPolicyAction.Request(policyName, enrichPolicy);
|
|
|
+ PutEnrichPolicyAction.Request request = new PutEnrichPolicyAction.Request(TEST_REQUEST_TIMEOUT, policyName, enrichPolicy);
|
|
|
client().execute(PutEnrichPolicyAction.INSTANCE, request).actionGet();
|
|
|
- client().execute(ExecuteEnrichPolicyAction.INSTANCE, new ExecuteEnrichPolicyAction.Request(policyName)).actionGet();
|
|
|
+ client().execute(ExecuteEnrichPolicyAction.INSTANCE, new ExecuteEnrichPolicyAction.Request(TEST_REQUEST_TIMEOUT, policyName))
|
|
|
+ .actionGet();
|
|
|
|
|
|
// A pipeline with a foreach that uses a non existing field that is specified after enrich has run:
|
|
|
String pipelineName = "my-pipeline";
|