Skip to content

Commit d984dc0

Browse files
committed
Fix failing sniffing tests
1 parent a108849 commit d984dc0

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

src/Elasticsearch.Net/Transport/Sniff/SniffResponse.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ namespace Elasticsearch.Net
88
public class SniffResponse
99
{
1010
//internal ctor - so that only Elasticsearch.Net can instantiate it
11-
internal SniffResponse()
12-
{
13-
}
11+
internal SniffResponse() { }
1412

1513
public static Regex AddressRegex { get; } = new Regex(@"^((?<fqdn>[^/]+)/)?(?<ip>[^:]+|\[[\da-fA-F:\.]+\]):(?<port>\d+)$");
1614

1715
public string cluster_name { get; set; }
18-
internal Dictionary<string, NodeInfo> nodes { get; set; }
16+
17+
public Dictionary<string, NodeInfo> nodes { get; set; }
1918

2019
public IEnumerable<Node> ToNodes(bool forceHttp = false)
2120
{
@@ -27,6 +26,7 @@ public IEnumerable<Node> ToNodes(bool forceHttp = false)
2726
Id = kv.Key,
2827
MasterEligible = kv.Value.MasterEligible,
2928
HoldsData = kv.Value.HoldsData,
29+
HttpEnabled = kv.Value.HttpEnabled
3030
};
3131
}
3232
}
@@ -47,7 +47,7 @@ private Uri ParseToUri(string boundAddress, bool forceHttp)
4747
}
4848
}
4949

50-
internal class NodeInfo
50+
public class NodeInfo
5151
{
5252
public string name { get; set; }
5353
public string transport_address { get; set; }
@@ -72,7 +72,7 @@ internal bool HttpEnabled
7272
}
7373
}
7474

75-
internal class NodeInfoHttp
75+
public class NodeInfoHttp
7676
{
7777
public IList<string> bound_address { get; set; }
7878
}

src/Tests/ClientConcepts/ConnectionPooling/BuildingBlocks/RequestPipelines.doc.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,16 @@ public void FirstUsageCheckConcurrentThreads()
113113
host = "127.0.0.1",
114114
ip = "127.0.01",
115115
version = "5.0.0-alpha3",
116-
build = "e455fd0",
117-
http_address = "127.0.0.1:9200",
118-
settings = new JObject
116+
build_hash = "e455fd0",
117+
roles = new List<string>(),
118+
http = new
119119
{
120-
{"client.type", "node"},
121-
{"cluster.name", "elasticsearch"},
122-
{"config.ignore_system_properties", "true"},
123-
{"name", "Node Name 1"},
124-
{"path.home", "c:\\elasticsearch\\elasticsearch"},
125-
{"path.logs", "c:/ elasticsearch/logs"}
120+
bound_address = new[] { "127.0.0.1:9200" }
121+
},
122+
settings = new Dictionary<string, object>
123+
{
124+
{ "cluster.name", "elasticsearch" },
125+
{ "node.name", "Node Name 1" }
126126
}
127127
}
128128
}

src/Tests/Cluster/NodesInfo/NodesInfoApiTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected override void ExpectResponse(INodesInfoResponse response)
4141
Assert(node.Http);
4242
}
4343

44-
protected void Assert(NodeInfo node)
44+
protected void Assert(Nest.NodeInfo node)
4545
{
4646
node.Should().NotBeNull();
4747
node.Name.Should().NotBeNullOrWhiteSpace();
@@ -117,7 +117,7 @@ protected void Assert(NodeInfoTransport transport)
117117
transport.PublishAddress.Should().NotBeNullOrWhiteSpace();
118118
}
119119

120-
protected void Assert(NodeInfoHttp http)
120+
protected void Assert(Nest.NodeInfoHttp http)
121121
{
122122
http.Should().NotBeNull();
123123
http.BoundAddress.Should().NotBeEmpty();

src/Tests/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# mode either u (unit test), i (integration test) or m (mixed mode)
2-
mode: m
2+
mode: u
33
# the elasticsearch version that should be started
44
# Can be a snapshot version of sonatype or "latest" to get the latest snapshot of sonatype
55
elasticsearch_version: 5.0.0

0 commit comments

Comments
 (0)