From: Aleksey Maksimov Date: Wed, 20 Nov 2013 03:07:12 +0000 (+0800) Subject: Added delay to let Jenkins to catchup with invocation X-Git-Tag: v0.2.23~62^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e283aee46ff408b03393ca64bb7461a2aab366ba;p=tools%2Fpython-jenkinsapi.git Added delay to let Jenkins to catchup with invocation --- diff --git a/jenkinsapi_tests/systests/test_invocation.py b/jenkinsapi_tests/systests/test_invocation.py index 0875dfd..d199edd 100644 --- a/jenkinsapi_tests/systests/test_invocation.py +++ b/jenkinsapi_tests/systests/test_invocation.py @@ -2,6 +2,7 @@ System tests for `jenkinsapi.jenkins` module. ''' import unittest +import time from jenkinsapi.build import Build from jenkinsapi.invocation import Invocation from jenkinsapi_tests.systests.base import BaseSystemTest @@ -17,6 +18,8 @@ class TestInvocation(BaseSystemTest): job = self.jenkins.create_job(job_name, LONG_RUNNING_JOB) ii = job.invoke(invoke_pre_check_delay=7) self.assertIsInstance(ii, Invocation) + # Let Jenkins catchup + time.sleep(3) self.assertTrue(ii.is_queued_or_running()) self.assertEquals(ii.get_build_number(), 1)