Esempio n. 1
0
        public void OperationManagerLoadsRunnerAndJobs()
        {
            ISolrOperationRunner  runner  = new SolrOperationRunner(_stubDirectory.Object, _stubRestClient.Object, _log.Object);
            ISolrOperationManager manager = new SolrOperationManager(_log.Object, runner);

            Assert.IsTrue(manager.OperationRunner.SolrOperations.Count(x => x.IsRunning) > 0);
        }
Esempio n. 2
0
        public void SolrOperationRunnerCancelsAllJobsSuccessfully()
        {
            ISolrOperationRunner runner = new SolrOperationRunner(_stubDirectory.Object, _stubRestClient.Object, _log.Object);

            runner.StartAllOperations();
            runner.StopAllOperations();
            Assert.IsFalse(runner.SolrOperations.Any(x => x.IsRunning));
        }
Esempio n. 3
0
        public void SolrOperationRunnerStartsAllJobsSuccessfully()
        {
            ISolrOperationRunner runner = new SolrOperationRunner(_stubDirectory.Object, _stubRestClient.Object, _log.Object);

            runner.StartAllOperations();

            Assert.AreEqual(2, runner.SolrOperations.Count(x => x.IsRunning));
        }
Esempio n. 4
0
        public void SolrOperationRunnerStartsASingularJobSuccessfully()
        {
            ISolrOperationRunner runner = new SolrOperationRunner(_stubDirectory.Object, _stubRestClient.Object, _log.Object);

            runner.StartOperation("TestJob1");

            Assert.AreEqual(1, runner.SolrOperations.Count(x => x.IsRunning));
        }
Esempio n. 5
0
        public void SolrOperationRunnerStopsASingularJobSuccessfully()
        {
            ISolrOperationRunner runner = new SolrOperationRunner(_stubDirectory.Object, _stubRestClient.Object, _log.Object);

            runner.StartOperation("TestJob1");
            runner.StopOperation("TestJob1");

            Assert.IsFalse(runner.SolrOperations.Any(x => x.IsRunning));
        }
Esempio n. 6
0
        public void SolrOperationRunnerReloadsAllJobsSuccessfully()
        {
            ISolrOperationRunner runner = new SolrOperationRunner(_stubDirectory.Object, _stubRestClient.Object, _log.Object);

            runner.StartAllOperations();

            //Get the reference
            ISolrOperation earlierOperation = runner.SolrOperations[0];

            //Reload
            runner.ReloadAllOperations();

            Assert.AreNotEqual(earlierOperation, runner.SolrOperations[0]);
        }