Update leader election methods

This commit is contained in:
Manuel Alejandro de Brito Fontes 2018-09-27 14:57:32 -03:00
parent 6c33bee8fd
commit 4c46ee95c9
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
3 changed files with 14 additions and 8 deletions

View file

@ -17,6 +17,7 @@ limitations under the License.
package status
import (
"context"
"os"
"testing"
"time"
@ -297,7 +298,7 @@ func TestStatusActions(t *testing.T) {
fk := fkSync.(statusSync)
// start it and wait for the election and syn actions
go fk.Run()
go fk.Run(context.Background())
// wait for the election
time.Sleep(100 * time.Millisecond)
// execute sync