Exemplo n.º 1
0
        public async Task successfully_registers_itself_as_an_active_node()
        {
            theNodeDiscovery.LocalNode.ShouldNotBeNull();

            var peers = await theNodeDiscovery.FindPeers();

            peers.Single().ServiceName.ShouldBe("ConsulTestApp");
        }
Exemplo n.º 2
0
        public async Task FanOutSubscriptionChangedMessage(IServiceBus bus, INodeDiscovery discovery)
        {
            var peers = await discovery.FindPeers();

            foreach (var node in peers)
            {
                var destination = node.DetermineLocalUri();
                if (destination != null)
                {
                    await bus.Send(destination, new SubscriptionsChanged());
                }
            }
        }
Exemplo n.º 3
0
        public async Task successfully_registers_itself_as_an_active_node()
        {
            theNodeDiscovery.LocalNode.ShouldNotBeNull();

            var peers = await theNodeDiscovery.FindPeers();

            peers.Single().ServiceName.ShouldBe("ConsulTestApp");

            using (var settings = new ConsulSettings())
            {
                var nodes = await settings.Client.KV.List(ConsulNodeDiscovery.TRANSPORTNODE_PREFIX);

                nodes.Response.Length.ShouldBe(1);
            }
        }