mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-20 01:05:19 +01:00
fix UT case failure (#7734)
Signed-off-by: Steven Zou <szou@vmware.com>
This commit is contained in:
parent
64b16c8915
commit
e091916d54
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user