mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-10 18:53:58 +09:00
Fix status table race condition (#1835)
This commit is contained in:
@ -18,6 +18,15 @@ func Test_StatusTable(t *testing.T) {
|
||||
table.Start("xyz")
|
||||
assert.True(t, table.IsRunning("xyz"))
|
||||
|
||||
assert.False(t, table.StartIfNotRunning("xyz"))
|
||||
assert.True(t, table.IsRunning("xyz"))
|
||||
|
||||
table.Stop("xyz")
|
||||
assert.False(t, table.IsRunning("xyz"))
|
||||
|
||||
assert.True(t, table.StartIfNotRunning("xyz"))
|
||||
assert.True(t, table.IsRunning("xyz"))
|
||||
|
||||
table.Stop("xyz")
|
||||
assert.False(t, table.IsRunning("xyz"))
|
||||
}
|
||||
|
Reference in New Issue
Block a user