public void DisconnectTimedOutExecutorsTestNoExecutors()
        {
            // whatever was not responsive in the last 60 seconds should get lost
            TimeSpan timeSpan = new TimeSpan(0, 0, 60);

            DisconnectTimedOutExecutors(timeSpan);

            Assert.AreEqual(0, m_managerStorage.GetExecutors().Length);
        }
Exemple #2
0
        public void DisconnectTimedOutExecutorsTestNoExecutors()
        {
            // whatever was not responsive in the last 60 seconds should get lost
            TimeSpan timeSpan = new TimeSpan(0, 0, 60);

            //TODO: This is now moved to the "watchdog" class
            //need a seperate tester for that.
            //DisconnectTimedOutExecutors(timeSpan);
            Assert.Fail("DisconnectTimedOutExecutors(timeSpan) is moved to a seperate class now. Need a new test case.");

            Assert.AreEqual(0, _managerStorage.GetExecutors().Length);
        }
Exemple #3
0
        public void Admon_PerformStorageMaintenanceTestWithParameters()
        {
            SetupApplicationsGroupsAndUsers(Permission.ManageAllApps);

            SecurityCredentials sc = new SecurityCredentials("username1", HashUtil.GetHash("password1", HashType.MD5));

            _managerStorage.AddApplication(new ApplicationStorageView("username1"));
            _managerStorage.AddExecutor(new ExecutorStorageView(true, true, DateTime.Now, "test", 1, "test", 1, 1, 1, 1));

            StorageMaintenanceParameters maintenanceParameters = new StorageMaintenanceParameters();

            maintenanceParameters.RemoveAllExecutors    = true;
            maintenanceParameters.RemoveAllApplications = true;

            // just to keep things honest make sure there is something there
            Assert.AreNotEqual(0, _managerStorage.GetExecutors().Length);
            Assert.AreNotEqual(0, _managerStorage.GetApplications().Length);

            Admon_PerformStorageMaintenance(sc, maintenanceParameters);

            Assert.AreEqual(0, _managerStorage.GetExecutors().Length);
            Assert.AreEqual(0, _managerStorage.GetApplications().Length);
        }
        public void RemoveExecutorsByPingTimeTestNothingToRemove()
        {
            Maintenance maintenance = new Maintenance();

            Assert.AreEqual(0, _managerStorage.GetExecutors().Length);

            maintenance.RemoveExecutors(_managerStorage, DateTime.Now);

            Assert.AreEqual(0, _managerStorage.GetExecutors().Length);
        }