Skip to content

Commit b4f3dbe

Browse files
committed
prove that ClusterNodesAsync still reports the node
1 parent a7e4fa6 commit b4f3dbe

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/StackExchange.Redis.Tests/ClusterHandshakeNodesUnitTests.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Linq;
12
using System.Threading.Tasks;
23
using Xunit;
34
using Xunit.Sdk;
@@ -27,5 +28,19 @@ public async Task ClusterHandshakeNodesAreIgnored()
2728
Assert.Contains(a, ep);
2829
Assert.Contains(b, ep);
2930
Assert.DoesNotContain(c, ep);
31+
32+
// check we can still *fetch* handshake nodes via the admin API
33+
var serverApi = conn.GetServer(a);
34+
var config = await serverApi.ClusterNodesAsync();
35+
Assert.NotNull(config);
36+
Assert.Equal(3, config.Nodes.Count);
37+
var eps = config.Nodes.Select(x => x.EndPoint).ToArray();
38+
Assert.Contains(a, eps);
39+
Assert.Contains(b, eps);
40+
Assert.Contains(c, eps);
41+
42+
Assert.False(config[a]!.IsHandshake);
43+
Assert.False(config[b]!.IsHandshake);
44+
Assert.True(config[c]!.IsHandshake);
3045
}
3146
}

0 commit comments

Comments
 (0)