コード例 #1
0
        protected void CreateNode()
		{
            var projections = new ProjectionsSubsystem(1, runProjections: ProjectionType.All, startStandardProjections: false);
            Node = new MiniNode(
                PathName, inMemDb: true, skipInitializeStandardUsersCheck: false, subsystems: new ISubsystem[] { projections });
            Node.Start();
		}
 private void CreateNode()
 {
     _projections = new ProjectionsSubsystem(1, runProjections: RunProjections.All);
     _node        = new MiniNode(
         PathName, inMemDb: true, skipInitializeStandardUsersCheck: false, subsystems: new ISubsystem[] { _projections });
     _node.Start();
 }
コード例 #3
0
        public void SetUp()
        {
            _standardComponents = CreateStandardComponents();

            Subsystem = new ProjectionsSubsystem(1, ProjectionType.All, true, TimeSpan.FromSeconds(3), true);
            Subsystem.Register(_standardComponents);

            // Unsubscribe from the actual components so we can test in isolation
            Subsystem.MasterMainBus.Unsubscribe <ProjectionSubsystemMessage.ComponentStarted>(Subsystem);
            Subsystem.MasterMainBus.Unsubscribe <ProjectionSubsystemMessage.ComponentStopped>(Subsystem);

            Subsystem.MasterMainBus.Subscribe(new AdHocHandler <Message>(
                                                  msg => {
                switch (msg)
                {
                case ProjectionSubsystemMessage.StartComponents start: {
                    _lastStartMessage = start;
                    _startReceived.Set();
                    break;
                }

                case ProjectionSubsystemMessage.StopComponents stop: {
                    _lastStopMessage = stop;
                    _stopReceived.Set();
                    break;
                }
                }
            }));

            Subsystem.Start();

            Given();
        }
コード例 #4
0
        protected MiniNode CreateNode()
        {
            var projections = new ProjectionsSubsystem(1, runProjections: ProjectionType.All, startStandardProjections: false);

            return(new MiniNode(
                       PathName, inMemDb: true, skipInitializeStandardUsersCheck: false, subsystems: new ISubsystem[] { projections }));
        }
 private void CreateNode()
 {
     _projections = new ProjectionsSubsystem(1, runProjections: RunProjections.All);
     _node = new MiniNode(
         PathName, inMemDb: true, skipInitializeStandardUsersCheck: false, subsystems: new ISubsystem[] {_projections});
     _node.Start();
 }
コード例 #6
0
 private MediumNode(string pathname, ProjectionsSubsystem projectionsSubsystem, bool runProjections)
     : base(pathname, subsystems: new [] { projectionsSubsystem })
 {
     _projections = projectionsSubsystem;
     RegisterWebControllers(new[] { NodeSubsystems.Projections });
     RegisterUIProjections();
 }
コード例 #7
0
 protected MiniNode <TLogFormat, TStreamId> CreateNode()
 {
     _projectionsSubsystem     = new ProjectionsSubsystem(new ProjectionSubsystemOptions(1, ProjectionType.All, false, TimeSpan.FromMinutes(Opts.ProjectionsQueryExpiryDefault), Opts.FaultOutOfOrderProjectionsDefault, 500, 250));
     _systemProjectionsCreated = SystemProjections.Created(_projectionsSubsystem.LeaderMainBus);
     return(new MiniNode <TLogFormat, TStreamId>(
                PathName, inMemDb: true,
                subsystems: new ISubsystem[] { _projectionsSubsystem }));
 }
コード例 #8
0
ファイル: MediumNode.cs プロジェクト: tubo70/EventStore
        public static MediumNode Create(string pathname, bool runProjections)
        {
            var projectionsSubsystem = new ProjectionsSubsystem(
                projectionWorkerThreadCount: 1,
                runProjections: runProjections ? RunProjections.All : RunProjections.System);

            return(new MediumNode(pathname, projectionsSubsystem, runProjections));
        }
コード例 #9
0
        protected MiniNode CreateNode()
        {
            var projections = new ProjectionsSubsystem(1, runProjections: ProjectionType.All,
                                                       startStandardProjections: false, projectionQueryExpiry: TimeSpan.FromMinutes(Opts.ProjectionsQueryExpiryDefault));

            return(new MiniNode(
                       PathName, inMemDb: true, skipInitializeStandardUsersCheck: false, subsystems: new ISubsystem[] { projections }));
        }
 private void CreateNode()
 {
     var projectionWorkerThreadCount = GivenWorkerThreadCount();
     _projections = new ProjectionsSubsystem(projectionWorkerThreadCount, runProjections: ProjectionType.All, developmentMode: false);
     _node = new MiniNode(
         PathName, inMemDb: true, skipInitializeStandardUsersCheck: false, subsystems: new ISubsystem[] {_projections});
     _node.Start();
 }
コード例 #11
0
        public override async Task TestFixtureSetUp()
        {
            await base.TestFixtureSetUp();

#if (!DEBUG)
            Assert.Ignore("These tests require DEBUG conditional");
#else
            var projectionWorkerThreadCount = GivenWorkerThreadCount();
            _projections = new ProjectionsSubsystem(projectionWorkerThreadCount, runProjections: ProjectionType.All,
                                                    startStandardProjections: false,
                                                    projectionQueryExpiry: TimeSpan.FromMinutes(Opts.ProjectionsQueryExpiryDefault),
                                                    faultOutOfOrderProjections: Opts.FaultOutOfOrderProjectionsDefault);
            _node = new MiniNode <TLogFormat, TStreamId>(
                PathName, inMemDb: true,
                subsystems: new ISubsystem[] { _projections });
            _projectionsCreated = SystemProjections.Created(_projections.LeaderMainBus);

            await _node.Start();

            _conn = EventStoreConnection.Create(new ConnectionSettingsBuilder()
                                                .DisableServerCertificateValidation()
                                                .Build(), _node.TcpEndPoint);
            await _conn.ConnectAsync();

            _manager = new ProjectionsManager(
                new ConsoleLogger(),
                _node.HttpEndPoint,
                TimeSpan.FromMilliseconds(20000),
                _node.HttpMessageHandler);

            _queryManager = new QueryManager(
                new ConsoleLogger(),
                _node.HttpEndPoint,
                TimeSpan.FromMilliseconds(20000),
                TimeSpan.FromMilliseconds(20000),
                _node.HttpMessageHandler);

            WaitIdle();

            if (GivenStandardProjectionsRunning())
            {
                await EnableStandardProjections();
            }

            WaitIdle();
            try {
                await Given().WithTimeout(TimeSpan.FromSeconds(10));
            } catch (Exception ex) {
                throw new Exception("Given Failed", ex);
            }

            try {
                await When().WithTimeout(TimeSpan.FromSeconds(10));
            } catch (Exception ex) {
                throw new Exception("When Failed", ex);
            }
#endif
        }
        private void CreateNode()
        {
            var projectionWorkerThreadCount = GivenWorkerThreadCount();

            _projections = new ProjectionsSubsystem(projectionWorkerThreadCount, runProjections: ProjectionType.All, startStandardProjections: false);
            _node        = new MiniNode(
                PathName, inMemDb: true, skipInitializeStandardUsersCheck: false, subsystems: new ISubsystem[] { _projections });
            _node.Start();
        }
コード例 #13
0
        protected void CreateNode()
        {
            var projections = new ProjectionsSubsystem(1, runProjections: ProjectionType.All,
                                                       startStandardProjections: false, projectionQueryExpiry: TimeSpan.FromMinutes(Opts.ProjectionsQueryExpiryDefault),
                                                       faultOutOfOrderProjections: Opts.FaultOutOfOrderProjectionsDefault);

            Node = new MiniNode(
                PathName, inMemDb: true, skipInitializeStandardUsersCheck: false, subsystems: new ISubsystem[] { projections });
            Node.Start();
        }
        private void CreateNode()
        {
            var projectionWorkerThreadCount = GivenWorkerThreadCount();

            _projections = new ProjectionsSubsystem(projectionWorkerThreadCount, runProjections: ProjectionType.All,
                                                    startStandardProjections: false, projectionQueryExpiry: TimeSpan.FromMinutes(Opts.ProjectionsQueryExpiryDefault));
            _node = new MiniNode(
                PathName, inMemDb: true, skipInitializeStandardUsersCheck: false, subsystems: new ISubsystem[] { _projections });
            _node.Start();
        }
        private MiniClusterNode <TLogFormat, TStreamId> CreateNode(int index, Endpoints endpoints, EndPoint[] gossipSeeds)
        {
            _projections[index] = new ProjectionsSubsystem(new ProjectionSubsystemOptions(1, ProjectionType.All, false, TimeSpan.FromMinutes(Opts.ProjectionsQueryExpiryDefault), Opts.FaultOutOfOrderProjectionsDefault, 500, 250));
            var node = new MiniClusterNode <TLogFormat, TStreamId>(
                PathName, index, endpoints.InternalTcp,
                endpoints.ExternalTcp, endpoints.HttpEndPoint,
                subsystems: new ISubsystem[] { _projections[index] }, gossipSeeds: gossipSeeds);

            return(node);
        }
コード例 #16
0
 private MiniClusterNode CreateNode(int index, Endpoints endpoints, IPEndPoint[] gossipSeeds)
 {
     _projections = new ProjectionsSubsystem(1, runProjections: ProjectionType.All, startStandardProjections: false);
     var node = new MiniClusterNode(
         PathName, index, endpoints.InternalTcp, endpoints.InternalTcpSec, endpoints.InternalHttp, endpoints.ExternalTcp,
         endpoints.ExternalTcpSec, endpoints.ExternalHttp, skipInitializeStandardUsersCheck: false,
         subsystems: new ISubsystem[] { _projections }, gossipSeeds: gossipSeeds);
     WaitIdle();
     return node;
 }
コード例 #17
0
 protected MiniNode CreateNode()
 {
     _projectionsSubsystem = new ProjectionsSubsystem(1, runProjections: ProjectionType.All,
                                                      startStandardProjections: false,
                                                      projectionQueryExpiry: TimeSpan.FromMinutes(Opts.ProjectionsQueryExpiryDefault),
                                                      faultOutOfOrderProjections: Opts.FaultOutOfOrderProjectionsDefault);
     _systemProjectionsCreated = SystemProjections.Created(_projectionsSubsystem.LeaderMainBus);
     return(new MiniNode(
                PathName, inMemDb: true, skipInitializeStandardUsersCheck: false,
                subsystems: new ISubsystem[] { _projectionsSubsystem }));
 }
コード例 #18
0
        private MiniClusterNode CreateNode(int index, Endpoints endpoints, IPEndPoint[] gossipSeeds)
        {
            _projections = new ProjectionsSubsystem(1, runProjections: ProjectionType.All,
                                                    startStandardProjections: false, projectionQueryExpiry: TimeSpan.FromMinutes(Opts.ProjectionsQueryExpiryDefault),
                                                    faultOutOfOrderProjections: Opts.FaultOutOfOrderProjectionsDefault);
            var node = new MiniClusterNode(
                PathName, index, endpoints.InternalTcp, endpoints.InternalTcpSec, endpoints.InternalHttp, endpoints.ExternalTcp,
                endpoints.ExternalTcpSec, endpoints.ExternalHttp, skipInitializeStandardUsersCheck: false,
                subsystems: new ISubsystem[] { _projections }, gossipSeeds: gossipSeeds);

            WaitIdle();
            return(node);
        }
コード例 #19
0
        private MiniClusterNode CreateNode(int index, Endpoints endpoints, EndPoint[] gossipSeeds)
        {
            _projections[index] = new ProjectionsSubsystem(1, runProjections: ProjectionType.All,
                                                           startStandardProjections: false,
                                                           projectionQueryExpiry: TimeSpan.FromMinutes(Opts.ProjectionsQueryExpiryDefault),
                                                           faultOutOfOrderProjections: Opts.FaultOutOfOrderProjectionsDefault);
            var node = new MiniClusterNode(
                PathName, index, endpoints.InternalTcp,
                endpoints.ExternalTcp, endpoints.HttpEndPoint,
                subsystems: new ISubsystem[] { _projections[index] }, gossipSeeds: gossipSeeds);

            return(node);
        }
コード例 #20
0
 public void SetUp()
 {
     if (!UseExternalEventStore)
     {
         var projections = new ProjectionsSubsystem(1, RunProjections.All);
         Node = new MiniNode(PathName, skipInitializeStandardUsersCheck: false, inMemDb: true, subsystems: new ISubsystem[] { projections });
         Node.Start();
         TcpEndPoint  = Node.TcpEndPoint;
         HttpEndPoint = Node.HttpEndPoint;
     }
     else
     {
         TcpEndPoint  = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1113);
         HttpEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 2113);
     }
     ReceiverAddress         = new Address("comp1", "store1");
     SenderAddress           = new Address("comp2", "store1");
     ConnectionConfiguration = new ConnectionConfiguration(ConnectionSettings.Create().SetDefaultUserCredentials(AdminCredentials), null, TcpEndPoint, HttpEndPoint, "");
     Thread.Sleep(5000);
 }
        public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();
#if DEBUG
            QueueStatsCollector.InitializeIdleDetection();
#else 
            throw new NotSupportedException("These tests require DEBUG conditional");
#endif
            _projections = new ProjectionsSubsystem(1, runProjections: RunProjections.All);
            _node = new MiniNode(
                PathName, inMemDb: true, skipInitializeStandardUsersCheck: false,
                subsystems: new ISubsystem[] {_projections});
            _node.Start();

            _conn = EventStoreConnection.Create(_node.TcpEndPoint);
            _conn.Connect();

            _manager = new ProjectionsManager(new ConsoleLogger(), _node.HttpEndPoint);
            if (GivenStandardProjectionsRunning())
                EnableStandardProjections();
            QueueStatsCollector.WaitIdle();
            Given();
            When();
        }
 private MiniClusterNode CreateNode(int index, Endpoints endpoints, IPEndPoint[] gossipSeeds)
 {
     _projections = new ProjectionsSubsystem(1, runProjections: ProjectionType.All, developmentMode: false);
     var node = new MiniClusterNode(
         PathName, index, endpoints.InternalTcp, endpoints.InternalTcpSec, endpoints.InternalHttp, endpoints.ExternalTcp,
         endpoints.ExternalTcpSec, endpoints.ExternalHttp, skipInitializeStandardUsersCheck: false,
         subsystems: new ISubsystem[] {_projections}, gossipSeeds: gossipSeeds);
     WaitIdle();
     return node;
 }