Skip to content

Commit 766c294

Browse files
committed
make sure processor stats on Node Stats API are only asserted when >=6.5.0
1 parent f632ae7 commit 766c294

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Tests/Tests/Aggregations/Bucket/AutoDateHistogram/AutoDateHistogramAggregationUsageTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Linq;
3+
using Elastic.Xunit.XunitPlumbing;
34
using FluentAssertions;
45
using Nest;
56
using Tests.Core.Extensions;
@@ -23,6 +24,7 @@ namespace Tests.Aggregations.Bucket.AutoDateHistogram
2324
*
2425
* Be sure to read the Elasticsearch documentation on {ref_current}/search-aggregations-bucket-autodatehistogram-aggregation.html[Auto Date Histogram Aggregation].
2526
*/
27+
[SkipVersion("<6.5.0", "")]
2628
public class AutoDateHistogramAggregationUsageTests : ProjectsOnlyAggregationUsageTestBase
2729
{
2830
public AutoDateHistogramAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

src/Tests/Tests/Cluster/NodesStats/NodesStatsApiTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Elasticsearch.Net;
44
using FluentAssertions;
55
using Nest;
6+
using Tests.Core.Client;
67
using Tests.Core.Extensions;
78
using Tests.Core.ManagedElasticsearch.Clusters;
89
using Tests.Core.ManagedElasticsearch.NodeSeeders;
@@ -76,6 +77,8 @@ protected void Assert(NodeIngestStats nodeIngestStats)
7677
nodeIngestStats.Pipelines.Should().NotBeNull();
7778
nodeIngestStats.Pipelines.Should().ContainKey(DefaultSeeder.PipelineName);
7879

80+
if (TestClient.Configuration.InRange("<6.5.0")) return;
81+
7982
var pipelineStats = nodeIngestStats.Pipelines[DefaultSeeder.PipelineName];
8083

8184
pipelineStats.Should().NotBeNull();
@@ -87,6 +90,7 @@ protected void Assert(NodeIngestStats nodeIngestStats)
8790
processorStats.Statistics.Should().NotBeNull();
8891

8992

93+
9094
}
9195

9296
protected void Assert(IReadOnlyDictionary<string, AdaptiveSelectionStats> adaptiveSelectionStats) =>

0 commit comments

Comments
 (0)