Exemplo n.º 1
0
        protected override IGridDomainNode CreateNode()
        {
            var connector = new GridNodeConnector(new StressTestNodeConfiguration());

            connector.Connect().Wait();
            return(connector);
        }
Exemplo n.º 2
0
            public Isolated_Client_can_connect()
            {
                var connector = new GridNodeConnector(new ServerConfiguration(),
                                                      new NodeConfiguration("Console", new NodeNetworkAddress()));

                connector.Connect().Wait();
                Success = true;
            }
Exemplo n.º 3
0
        private static IGridDomainNode ConnectToNode()
        {
            var address   = new ShopNodeAddress();
            var connector = new GridNodeConnector(new NodeConfiguration("ShopNode", new ShopNodeAddress()));

            Log.Information("started connect to griddomain node at {@address}", address);
            connector.Connect()
            .ContinueWith(t => Log.Information("Connected to griddomain node at {@address}", address),
                          TaskContinuationOptions.OnlyOnRanToCompletion);
            return(connector);
        }
Exemplo n.º 4
0
            public Isolated_Console_can_execute_commands()
            {
                var connector = new GridNodeConnector(new ServerConfiguration(),
                                                      new NodeConfiguration("Console", new NodeNetworkAddress()));

                connector.Connect().Wait();
                var command = new InflateNewBallonCommand(42, Guid.NewGuid().ToString());

                connector.Execute(command).Wait();

                Success = true;
            }
Exemplo n.º 5
0
            public ClientLaunch_wait_for_command_produced_events()
            {
                var connector = new GridNodeConnector(new ServerConfiguration(),
                                                      new NodeConfiguration("Console", new NodeNetworkAddress()));

                connector.Connect().Wait();
                var command = new InflateNewBallonCommand(42, Guid.NewGuid().ToString());

                connector.Prepare(command)
                .Expect <BalloonCreated>()
                .Execute().Wait();

                Success = true;
            }
Exemplo n.º 6
0
        public async Task Given_existing_GridNode()
        {
            var container = new UnityContainer();
            var sampleDomainContainerConfiguration = new SampleDomainContainerConfiguration();

            container.Register(sampleDomainContainerConfiguration);

            var serverConfig = new TestGridNodeConfiguration();

            _node = new GridDomainNode(sampleDomainContainerConfiguration,
                                       new SampleRouteMap(container),
                                       () => serverConfig.CreateInMemorySystem());

            await _node.Start();


            _connector = new GridNodeConnector(serverConfig.Network);
            _connector.Connect();
        }
Exemplo n.º 7
0
 public void Can_manual_reconnect_several_times()
 {
     _connector.Connect();
 }