Skip to content

Commit 423730a

Browse files
committed
Provide a more realistic mapping
1 parent 92ba51c commit 423730a

File tree

1 file changed

+2
-12
lines changed
  • x-pack/plugin/downsample/src/internalClusterTest/java/org/elasticsearch/xpack/downsample

1 file changed

+2
-12
lines changed

x-pack/plugin/downsample/src/internalClusterTest/java/org/elasticsearch/xpack/downsample/DownsampleIT.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,13 @@
1313
import org.elasticsearch.action.support.SubscribableListener;
1414
import org.elasticsearch.cluster.metadata.IndexMetadata;
1515
import org.elasticsearch.common.settings.Settings;
16-
import org.elasticsearch.datastreams.DataStreamsPlugin;
17-
import org.elasticsearch.plugins.Plugin;
1816
import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval;
1917
import org.elasticsearch.test.ClusterServiceUtils;
2018
import org.elasticsearch.xcontent.XContentBuilder;
2119
import org.elasticsearch.xcontent.XContentFactory;
22-
import org.elasticsearch.xpack.aggregatemetric.AggregateMetricMapperPlugin;
23-
import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin;
2420

2521
import java.io.IOException;
2622
import java.time.Instant;
27-
import java.util.Collection;
2823
import java.util.List;
2924
import java.util.function.Supplier;
3025

@@ -33,18 +28,13 @@
3328

3429
public class DownsampleIT extends DownsamplingIntegTestCase {
3530

36-
@Override
37-
protected Collection<Class<? extends Plugin>> nodePlugins() {
38-
return List.of(DataStreamsPlugin.class, LocalStateCompositeXPackPlugin.class, Downsample.class, AggregateMetricMapperPlugin.class);
39-
}
40-
4131
public void testDownsampling() throws Exception {
4232
String dataStreamName = "metrics-foo";
4333

4434
putTSDBIndexTemplate("my-template", List.of("metrics-foo"), null, """
4535
{
4636
"properties": {
47-
"metrics": {
37+
"attributes": {
4838
"type": "passthrough",
4939
"priority": 10,
5040
"time_series_dimension": true
@@ -64,7 +54,7 @@ public void testDownsampling() throws Exception {
6454
return XContentFactory.jsonBuilder()
6555
.startObject()
6656
.field("@timestamp", ts)
67-
.field("metrics.host.name", randomFrom("host1", "host2", "host3"))
57+
.field("attributes.host.name", randomFrom("host1", "host2", "host3"))
6858
.field("metrics.cpu_usage", randomDouble())
6959
.endObject();
7060
} catch (IOException e) {

0 commit comments

Comments
 (0)