Beispiel #1
0
 /// <summary>
 /// Clear down the test context.
 /// </summary>
 protected virtual void TidyUp()
 {
     // Ensure that we wipe down the core objects - NUnit re-uses the instance for all tests
     entityFactory    = null;
     checkerFactory   = null;
     container        = null;
     containerContext = null;
 }
Beispiel #2
0
 public ThreadedCheckScheduler(
     ICheckLog checkLog,
     ICheckStats checkStats,
     ICheckerFactory checkerFactory,
     ILog log)
 {
     _log            = log ?? throw new ArgumentNullException(nameof(log));
     _checkLog       = checkLog ?? throw new ArgumentNullException(nameof(checkLog));
     _checkStats     = checkStats ?? throw new ArgumentNullException(nameof(checkStats));
     _checkerFactory = checkerFactory ?? throw new ArgumentNullException(nameof(checkerFactory));
 }
Beispiel #3
0
 public SynchronizerWatchdogThreadTester(ICheckerFactory checkerFactory, IEtcdLeaseBackgroundTask etcdLeaseBackgroundTask)
     : base(checkerFactory, etcdLeaseBackgroundTask)
 {
 }
 /// <summary>
 /// Clear down the test context.
 /// </summary>
 protected virtual void TidyUp()
 {
     // Ensure that we wipe down the core objects - NUnit re-uses the instance for all tests
     checkerFactory = null;
 }
 /// <summary>
 /// Create a new instance of the <see cref="CheckerBuilder" /> class.
 /// </summary>
 /// <param name="factory"></param>
 public CheckerBuilder(ICheckerFactory factory)
 {
     Checker.CheckerFactory = factory;
 }
Beispiel #6
0
 /// <summary>
 /// Create a new instance of the <see cref="CheckerBuilder" /> class.
 /// </summary>
 /// <param name="factory"></param>
 public CheckerBuilder(ICheckerFactory factory)
 {
     // Set this as the global factory, needed by individual checkers if they do Entity checks
     Checker.CheckerFactory = factory;
 }
Beispiel #7
0
 public NodeWatchdogThread(ICheckerFactory checkerFactory)
     : base(() => new IChecker[] { checkerFactory.CreateChecker <IDiskSpaceChecker>() })
 {
 }
 /// <summary>
 /// Create a new instance of the <see cref="CheckerBuilder" /> class.
 /// </summary>
 /// <param name="factory"></param>
 public CheckerBuilder(ICheckerFactory factory)
 {
     Checker.CheckerFactory = factory;
 }
 public NodeWatchdogThreadTester(ICheckerFactory checkerFactory)
     : base(checkerFactory)
 {
 }
Beispiel #10
0
 /// <summary>
 /// Create a new instance of the <see cref="CheckerBuilder" /> class.
 /// </summary>
 /// <param name="factory"></param>
 public CheckerBuilder(ICheckerFactory factory)
 {
     // Set this as the global factory, needed by individual checkers if they do Entity checks
     Checker.CheckerFactory = factory;
 }
 public SynchronizerWatchdogThread(ICheckerFactory checkerFactory, IEtcdLeaseBackgroundTask etcdLeaseBackgroundTask)
     : base(() => new IChecker[] { checkerFactory.CreateChecker <ILeaderElectionChecker>(), checkerFactory.CreateChecker <IDiskSpaceChecker>() })
 {
     _etcdLeaseBackgroundTask = etcdLeaseBackgroundTask;
 }