Skip to content

Commit

Permalink
Fixed unstable test in travis
Browse files Browse the repository at this point in the history
  • Loading branch information
pierresouchay committed Aug 28, 2019
1 parent 8722e18 commit 6bb8396
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions memberlist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func testConfig(tb testing.TB) *Config {
}

func yield() {
time.Sleep(5 * time.Millisecond)
time.Sleep(250 * time.Millisecond)
}

type MockDelegate struct {
Expand Down Expand Up @@ -1356,7 +1356,7 @@ func TestMemberlist_conflictDelegate(t *testing.T) {

// Ensure we were notified
if mock.existing == nil || mock.other == nil {
t.Fatalf("should get notified")
t.Fatalf("should get notified mock.existing=%v VS mock.other=%v", mock.existing, mock.other)
}
if mock.existing.Name != mock.other.Name {
t.Fatalf("bad: %v %v", mock.existing, mock.other)
Expand Down Expand Up @@ -1452,7 +1452,7 @@ func TestMemberlist_PingDelegate(t *testing.T) {

func waitUntilSize(t *testing.T, m *Memberlist, expected int) {
t.Helper()
retry(t, 15, 250*time.Millisecond, func(failf func(string, ...interface{})) {
retry(t, 15, 500*time.Millisecond, func(failf func(string, ...interface{})) {
t.Helper()

if m.NumMembers() != expected {
Expand Down

0 comments on commit 6bb8396

Please sign in to comment.