private void Shutdown()
        {
            _logger.Debug("Waiting for all threads to finish");
            _threadManager.WaitForThreads();

            _pipeServerManager.PrepareShutdown();

            _threadManager.Shutdown();

            _settingsManager.SaveCurrentSettings();
            _jobHistoryManager.Save();

            _pipeServerManager.Shutdown();
        }
Exemple #2
0
        public void ValidateShutdownSequence()
        {
            var starter = BuildMaybePipedApplicationStarter(0);

            starter.SendMessageOrStartApplication(() => "", () => false, false);

            Received.InOrder(() =>
            {
                _settingsManager.LoadAllSettings();
                _threadManager.WaitForThreads();
                _pipeServerManager.PrepareShutdown();
                _threadManager.Shutdown();
                _settingsManager.SaveCurrentSettings();
                _jobHistoryManager.Save();
                _pipeServerManager.Shutdown();
            });
        }
Exemple #3
0
        public void Save_CallsJobHistoryStorageSave()
        {
            _jobHistoryManager.Save();

            _jobHistoryStorage.Received(1).Save(_jobHistoryManager.History);
        }