fix UT case failure (#7734)

Signed-off-by: Steven Zou <szou@vmware.com>
This commit is contained in:
Steven Zou 2019-05-10 13:15:45 +08:00 committed by Wang Yan
parent 64b16c8915
commit e091916d54

View File

@ -188,7 +188,7 @@ func (suite *CWorkerTestSuite) TestStopJob() {
t, err := suite.lcmCtl.New(genericJob)
require.NoError(suite.T(), err, "new job stats: nil error expected but got %s", err)
time.Sleep(500 * time.Millisecond)
time.Sleep(3 * time.Second)
latest, err := t.Status()
require.NoError(suite.T(), err, "get latest status: nil error expected but got %s", err)
@ -255,7 +255,7 @@ func (j *fakeLongRunJob) Validate(params job.Parameters) error {
}
func (j *fakeLongRunJob) Run(ctx job.Context, params job.Parameters) error {
time.Sleep(2 * time.Second)
time.Sleep(5 * time.Second)
if _, stopped := ctx.OPCommand(); stopped {
return nil