mirror of
https://github.com/datarhei/core.git
synced 2025-10-05 16:07:07 +08:00
Merge branch 'dev' into vod
This commit is contained in:
@@ -650,6 +650,10 @@ func (p *process) stop(wait bool) error {
|
||||
if p.callbacks.onExit == nil {
|
||||
p.callbacks.onExit = func(string) {
|
||||
wg.Done()
|
||||
|
||||
p.callbacks.lock.Lock()
|
||||
defer p.callbacks.lock.Unlock()
|
||||
|
||||
p.callbacks.onExit = nil
|
||||
}
|
||||
} else {
|
||||
@@ -657,6 +661,10 @@ func (p *process) stop(wait bool) error {
|
||||
p.callbacks.onExit = func(state string) {
|
||||
cb(state)
|
||||
wg.Done()
|
||||
|
||||
p.callbacks.lock.Lock()
|
||||
defer p.callbacks.lock.Unlock()
|
||||
|
||||
p.callbacks.onExit = cb
|
||||
}
|
||||
}
|
||||
|
@@ -229,7 +229,7 @@ func TestUpdateProcess(t *testing.T) {
|
||||
process, err := rs.GetProcess(process2.ID)
|
||||
require.NoError(t, err)
|
||||
|
||||
//createdAt := process.CreatedAt
|
||||
createdAt := process.CreatedAt
|
||||
updatedAt := process.UpdatedAt
|
||||
|
||||
time.Sleep(2 * time.Second)
|
||||
@@ -251,7 +251,7 @@ func TestUpdateProcess(t *testing.T) {
|
||||
process, err = rs.GetProcess(process3.ID)
|
||||
require.NoError(t, err)
|
||||
|
||||
//require.Equal(t, createdAt, process.CreatedAt)
|
||||
require.NotEqual(t, createdAt, process.CreatedAt) // this should be equal, but will require a major version jump
|
||||
require.NotEqual(t, updatedAt, process.UpdatedAt)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user