Skip to content

Commit a14dddf

Browse files
committed
Fix cluster stats and state integ tests
We percolate on response is now percolator, shard version is no longer returned
1 parent c5b71db commit a14dddf

File tree

5 files changed

+31
-9
lines changed

5 files changed

+31
-9
lines changed

src/Nest/Cluster/ClusterState/RoutingShard.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ public class RoutingShard
2525
[JsonProperty("shard")]
2626
public int Shard { get; internal set; }
2727

28-
[JsonProperty("version")]
29-
public long Version { get; internal set; }
30-
3128
[JsonProperty("index")]
3229
public string Index { get; internal set; }
3330
}
34-
}
31+
}

src/Nest/Cluster/ClusterStats/ClusterIndicesStats.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ public class ClusterIndicesStats
1818
[JsonProperty("fielddata")]
1919
public FielddataStats Fielddata { get; internal set; }
2020

21-
[JsonProperty("percolate")]
22-
public PercolatorStats Percolate { get; internal set; }
21+
[JsonProperty("percolator")]
22+
public PercolatorStats Percolator { get; internal set; }
2323

2424
[JsonProperty("query_cache")]
2525
public QueryCacheStats QueryCache { get; internal set; }
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Newtonsoft.Json;
2+
3+
namespace Nest
4+
{
5+
[JsonObject]
6+
public class PercolatorStats
7+
{
8+
[JsonProperty("total")]
9+
public long Total { get; set; }
10+
11+
[JsonProperty("time")]
12+
public string Time { get; set; }
13+
[JsonProperty("time_in_millis")]
14+
public long TimeInMilliseconds { get; set; }
15+
16+
[JsonProperty("current")]
17+
public long Current { get; set; }
18+
19+
[JsonProperty("memory_size")]
20+
public string MemorySize { get; set; }
21+
[JsonProperty("memory_size_in_bytes")]
22+
public long MemorySizeInBytes { get; set; }
23+
24+
[JsonProperty("queries")]
25+
public long Queries { get; set; }
26+
}
27+
}

src/Tests/Cluster/ClusterState/ClusterStatsApiTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ protected void Assert(RoutingTableState routingTable)
101101
shard.Index.Should().NotBeNullOrWhiteSpace();
102102
shard.Node.Should().NotBeNullOrWhiteSpace();
103103
shard.State.Should().NotBeNullOrWhiteSpace();
104-
shard.Version.Should().BeGreaterThan(0);
105104
}
106105

107106
protected void Assert(RoutingNodesState routingNodes, string master)
@@ -118,7 +117,6 @@ protected void Assert(RoutingNodesState routingNodes, string master)
118117
node.Index.Should().NotBeNullOrWhiteSpace();
119118
node.Node.Should().NotBeNullOrWhiteSpace();
120119
node.State.Should().NotBeNullOrWhiteSpace();
121-
node.Version.Should().BeGreaterThan(0);
122120
}
123121
}
124122
}

src/Tests/Cluster/ClusterStats/ClusterStatsApiTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected void Assert(ClusterIndicesStats indices)
9393

9494
indices.Completion.Should().NotBeNull();
9595
indices.Fielddata.Should().NotBeNull();
96-
indices.Percolate.Should().NotBeNull();
96+
indices.Percolator.Should().NotBeNull();
9797
indices.QueryCache.Should().NotBeNull();
9898

9999
indices.Segments.Should().NotBeNull();

0 commit comments

Comments
 (0)