While I agree with the LGTM to keep the test focused on testing just one thing, the fact that this issue occured in our QA means that we have no test enforcing a certain level of performance for forking off jobs.
Should we introduce one? It could also help us hunt down this regression which could be a bug. On May 18, 2015 11:44 AM, "'Petr Pudlak' via ganeti-devel" < [email protected]> wrote: > On Fri, May 15, 2015 at 08:12:53PM +0200, 'Klaus Aehlig' via ganeti-devel > wrote: > >> The test submits 3 jobs in an environment rate-limited to two, and >> verifies >> that the first 2 jobs are running whereas the third one remains queued. >> However, >> it takes for Ganeti some time to get a submitted job to actually being >> confirmed >> waiting (in some circumstances over a second). So wait a bit longer to >> avoid >> losing the race. While there, increase the time of the delay jobs to avoid >> them finishing during that test in an extremely slowly running QA. (Note >> that >> the jobs are killed forcefully at the end of the test, so that time is >> never >> really waited for.) >> >> Signed-off-by: Klaus Aehlig <[email protected]> >> --- >> qa/qa_filters.py | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/qa/qa_filters.py b/qa/qa_filters.py >> index efc17a6..3bede89 100644 >> --- a/qa/qa_filters.py >> +++ b/qa/qa_filters.py >> @@ -342,16 +342,16 @@ def TestFilterRateLimit(): >> >> # Now only the first 2 jobs must be scheduled. >> jid1 = int(stdout_of([ >> - "gnt-debug", "delay", "--print-jobid", "--submit", "20" >> + "gnt-debug", "delay", "--print-jobid", "--submit", "200" >> ])) >> jid2 = int(stdout_of([ >> - "gnt-debug", "delay", "--print-jobid", "--submit", "20" >> + "gnt-debug", "delay", "--print-jobid", "--submit", "200" >> ])) >> jid3 = int(stdout_of([ >> - "gnt-debug", "delay", "--print-jobid", "--submit", "20" >> + "gnt-debug", "delay", "--print-jobid", "--submit", "200" >> ])) >> >> - time.sleep(0.1) # give the scheduler some time to notice >> + time.sleep(5) # give the scheduler some time to notice >> >> AssertIn(GetJobStatus(jid1), ["running", "waiting"], >> msg="Job should not be rate-limited") >> -- >> 2.2.0.rc0.207.ga3a616c >> >> > LGTM, thanks >
