mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2024-11-22 13:16:04 +03:00
wait before checking job
This commit is contained in:
parent
48773fbccb
commit
fe94516c5f
@ -452,6 +452,7 @@ func (t *JobManagerTest) Test_RunJobOnce() {
|
|||||||
require.NotNil(t.T(), t.manager.jobs)
|
require.NotNil(t.T(), t.manager.jobs)
|
||||||
go func() { t.runnerFlag <- false }()
|
go func() { t.runnerFlag <- false }()
|
||||||
err := t.manager.RunJobOnce("job")
|
err := t.manager.RunJobOnce("job")
|
||||||
|
time.Sleep(200 * time.Millisecond)
|
||||||
require.NoError(t.T(), err)
|
require.NoError(t.T(), err)
|
||||||
assert.True(t.T(), t.ranFlag())
|
assert.True(t.T(), t.ranFlag())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user