Skip to content

Commit e38c9a2

Browse files
committed
Fix #1255: correction of NodeStats host property
1 parent 983ae53 commit e38c9a2

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/Nest/Domain/Stats/NodeStats.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ public class NodeStats
1010
{
1111
[JsonProperty("timestamp")]
1212
public long Timestamp { get; internal set; }
13+
1314
[JsonProperty("name")]
1415
public string Name { get; internal set; }
16+
1517
[JsonProperty("transport_address")]
1618
public string TransportAddress { get; internal set; }
17-
[JsonProperty("hostname")]
18-
public string Hostname { get; internal set; }
19+
20+
// TODO: Rename to Host in 2.0
21+
[JsonProperty("host")]
22+
public string Hostname { get; internal set; }
1923

2024
[JsonProperty("indices")]
2125
public NodeStatsIndexes Indices { get; internal set; }

src/Tests/Nest.Tests.Integration/Cluster/NodeTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ public void NodeStats()
3939
var r = this.Client.NodesStats();
4040
Assert.True(r.IsValid);
4141
Assert.IsNotNull(r.Nodes);
42-
var node = r.Nodes.Values.First();
4342

43+
var node = r.Nodes.Values.First();
44+
Assert.IsNotNull(node.Hostname);
4445
Assert.IsNotNull(node.Indices);
4546
Assert.IsNotNull(node.FileSystem);
4647
Assert.IsNotNull(node.OS);

0 commit comments

Comments
 (0)