wait before checking job

This commit is contained in:
Pavel 2020-04-29 11:29:32 +03:00
parent 48773fbccb
commit fe94516c5f

View File

@ -452,6 +452,7 @@ func (t *JobManagerTest) Test_RunJobOnce() {
require.NotNil(t.T(), t.manager.jobs)
go func() { t.runnerFlag <- false }()
err := t.manager.RunJobOnce("job")
time.Sleep(200 * time.Millisecond)
require.NoError(t.T(), err)
assert.True(t.T(), t.ranFlag())
}