Fix multiple leader election

This commit is contained in:
Manuel de Brito Fontes 2017-09-11 18:56:20 -03:00
parent 7eb2b81fd3
commit f3efe498ed
2 changed files with 15 additions and 32 deletions

View file

@ -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) {