How to use _get_job_dependencies method in autotest

Best Python code snippet using autotest_python Github


Full Screen

...251 # Get a fresh copy of the job from the database252 newjob = list(db._get_all_jobs_in_state('INCOMING'))[0]253 self.assertIsNot(job, newjob)254 self.assertEqual(newjob._metadata['runner_id'], 'new-SGE-ID')255 def test_get_job_dependencies(self):256 """Check Database._get_job_dependencies()"""257 db = MemoryDatabase(Job)258 db._connect(None)259 db._create_tables()260 self.assertEqual(db._get_job_dependencies(), {})261 c = db.conn.cursor()262 query = "INSERT INTO dependencies(child,parent) VALUES(?,?)"263 c.execute(query, ('foo', 'bar'))264 c.execute(query, ('a', 'one'))265 c.execute(query, ('a', 'two'))266 db.conn.commit()267 self.assertEqual(db._get_job_dependencies(),268 {'foo': ['bar'], 'a': ['one', 'two']})269if __name__ == '__main__':...

Full Screen

Full Screen Github


Full Screen

...24 from autotest_lib.scheduler import query_managers25 self.query_manager = query_managers.AFEHostQueryManager()26 jobs = [queue_entry.job_id for queue_entry in queue_entries]27 self._job_acls = self.query_manager._get_job_acl_groups(jobs)28 self._job_deps = self.query_manager._get_job_dependencies(jobs)29 self._labels = self.query_manager._get_labels(self._job_deps)30 self._suite_min_duts = suite_min_duts or {}31 def get_job_info(self, queue_entry):32 """Extract job information from a queue_entry/host-scheduler.33 @param queue_entry: The queue_entry for which we need job information.34 @return: A dictionary representing job related information.35 """36 job_id = queue_entry.job_id37 job_deps, job_preferred_deps = [], []38 for dep in self._job_deps.get(job_id, []):39 if not provision.is_for_special_action(self._labels[dep].name):40 job_deps.append(dep)41 elif provision.Provision.acts_on(self._labels[dep].name):42 job_preferred_deps.append(dep)...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:


You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?