From 4b54e17020d461114556fe90a62389269dcacea0 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Mon, 1 Feb 2021 17:00:19 +0000 Subject: [PATCH] fw/job: Fix workload cache check Don't assume the first job iteration is already in the workload cache. This may not always be the case, for example with the random execution order a later iteration can be processed first. Instead check to see if the job id is present or not. --- wa/framework/job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wa/framework/job.py b/wa/framework/job.py index b2bb7535..dee9a7e9 100644 --- a/wa/framework/job.py +++ b/wa/framework/job.py @@ -75,7 +75,7 @@ class Job(object): def load(self, target, loader=pluginloader): self.logger.info('Loading job {}'.format(self)) - if self.iteration == 1: + if self.id not in self._workload_cache: self.workload = loader.get_workload(self.spec.workload_name, target, **self.spec.workload_parameters)