Beispiel #1
0
        /// <summary>
        /// Attempt to retrieve reminders, that are my responsibility, from the global reminder table when starting this silo (reminder service instance)
        /// </summary>
        /// <returns></returns>
        public override async Task Start()
        {
            // confirm that it can access the underlying store, as after this the ReminderService will load in the background, without the opportunity to prevent the Silo from starting
            await reminderTable.Init().WithTimeout(initTimeout, $"ReminderTable Initialization failed due to timeout {initTimeout}");

            await base.Start();
        }
        protected ReminderTableTestsBase(ClusterFixture clusterFixture, LoggerFilterOptions filters)
        {
            this.clusterFixture = clusterFixture;

            loggerFactory = TestingUtils.CreateDefaultLoggerFactory($"{GetType()}.log", filters);
            logger        = loggerFactory.CreateLogger <ReminderTableTestsBase>();
            string serviceId = Guid.NewGuid().ToString();
            string clusterId = "test-" + serviceId;

            logger.Info("ClusterId={0}", clusterId);
            clusterOptions = Options.Create(new ClusterOptions {
                ClusterId = clusterId, ServiceId = serviceId
            });

            IReminderTable rmndr = CreateRemindersTable();

            rmndr.Init().WithTimeout(TimeSpan.FromMinutes(1)).Wait();
            remindersTable = rmndr;
        }