def test_generatePlan(self):
        for config in self.config_list:
            scheduler_plugin = config['destiny']['scheduler_plugin']
            destiny_object = config['destiny'][scheduler_plugin]
            min_gap = (destiny_object['constraints']
                       ['min_gap_between_failures'])
            max_gap = (destiny_object['constraints']
                       ['max_gap_between_failures'])
            total_run = (destiny_object['constraints']
                         ['total_run_duration'])
            non_det_sched_obj = (NonDeterministicScheduler
                                 .NonDeterministicScheduler(destiny_object,
                                                            verbose=True,
                                                            debug=True))
            last_step = 0
            plan_index = 0
            start_timestamp = int(time.time())
            current_step_time = start_timestamp + 60 * min_gap
            for plan_step in non_det_sched_obj.plan:
                self.assertEqual(len(plan_step), 1)
                failure = plan_step.keys()[0]
                step = plan_step[failure]
                # All failures should belong to destiny object failures
                self.assert_(failure in destiny_object['failures'].keys())
                # Each step should be larger than min wait time while being
                # less than max wait time
                self.assert_(current_step_time <= step)
                self.assert_(current_step_time + 60 * max_gap >= step)
                # Each step should be bigger than the last
                self.assert_(step > last_step)
                # Each step should be less than the max runtime provided
                # its not the last step
                # (Currently last step larger than total time, is this ok ?)
                self.assert_(step <= total_run * 60 + start_timestamp)
                current_step_time = step
                plan_index += 1
Make sure the plan generated for each fatebook, follows
dataset/ETHPy150Open linkedin/simoorg/src/test/test_NonDeterministicScheduler.py/TestNonDeterministicScheduler.test_generatePlan