Fix multiple leader election
This commit is contained in:
parent
7eb2b81fd3
commit
f3efe498ed
2 changed files with 15 additions and 32 deletions
|
|
@ -19,7 +19,6 @@ package status
|
|||
import (
|
||||
"os"
|
||||
"sort"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
|
@ -245,7 +244,6 @@ func buildStatusSync() statusSync {
|
|||
"lable_sig": "foo_pod",
|
||||
},
|
||||
},
|
||||
runLock: &sync.Mutex{},
|
||||
syncQueue: task.NewTaskQueue(fakeSynFn),
|
||||
Config: Config{
|
||||
Client: buildSimpleClientSet(),
|
||||
|
|
@ -328,9 +326,7 @@ func TestStatusActions(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestCallback(t *testing.T) {
|
||||
fk := buildStatusSync()
|
||||
// do nothing
|
||||
fk.callback("foo_base_pod")
|
||||
buildStatusSync()
|
||||
}
|
||||
|
||||
func TestKeyfunc(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue