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); }
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)); }
public void SolrOperationRunnerStartsAllJobsSuccessfully() { ISolrOperationRunner runner = new SolrOperationRunner(_stubDirectory.Object, _stubRestClient.Object, _log.Object); runner.StartAllOperations(); Assert.AreEqual(2, runner.SolrOperations.Count(x => x.IsRunning)); }
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)); }
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)); }
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]); }