Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Fixes tribe tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcooklin committed Oct 6, 2015
1 parent d83bbe1 commit d24dce2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions mgmt/rest/tribe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ func startTribes(count int) []int {
tribePort := getAvailablePort()
conf := tribe.DefaultConfig(fmt.Sprintf("member-%v", mgtPort), "127.0.0.1", tribePort, seed, mgtPort)
conf.MemberlistConfig.PushPullInterval = 5 * time.Second
conf.MemberlistConfig.RetransmitMult = conf.MemberlistConfig.RetransmitMult * 2
if seed == "" {
seed = fmt.Sprintf("%s:%d", "127.0.0.1", tribePort)
}
Expand Down
9 changes: 5 additions & 4 deletions mgmt/tribe/tribe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func TestFullStateSync(t *testing.T) {
}

func TestFullStateSyncOnJoin(t *testing.T) {
numOfTribes := 6
numOfTribes := 5
agreement1 := "agreement1"
plugin1 := agreement.Plugin{Name_: "plugin1", Version_: 1}
plugin2 := agreement.Plugin{Name_: "plugin2", Version_: 1}
Expand Down Expand Up @@ -180,7 +180,7 @@ func TestFullStateSyncOnJoin(t *testing.T) {
}

func TestTaskAgreements(t *testing.T) {
numOfTribes := 10
numOfTribes := 5
tribes := getTribes(numOfTribes, nil)
Convey(fmt.Sprintf("%d tribes are started", numOfTribes), t, func() {
for i := 0; i < numOfTribes; i++ {
Expand Down Expand Up @@ -299,7 +299,7 @@ func TestTaskAgreements(t *testing.T) {
}

func TestTribeAgreements(t *testing.T) {
numOfTribes := 10
numOfTribes := 5
tribes := getTribes(numOfTribes, nil)
Convey(fmt.Sprintf("%d tribes are started", numOfTribes), t, func() {
for i := 0; i < numOfTribes; i++ {
Expand Down Expand Up @@ -882,13 +882,14 @@ func getTribes(numOfTribes int, seedTribe *tribe) []*tribe {
// seed = fmt.Sprintf("127.0.0.1:%d", seedPort)
// }
conf := DefaultConfig(fmt.Sprintf("member-%v", i), "127.0.0.1", port, seed, getAvailablePort())
conf.MemberlistConfig.RetransmitMult = conf.MemberlistConfig.RetransmitMult * 2
tr, err := New(conf)
if err != nil {
panic(err)
}
tribes = append(tribes, tr)
wg.Add(1)
to := time.After(4 * time.Second)
to := time.After(15 * time.Second)
go func(tr *tribe) {
defer wg.Done()
for {
Expand Down

0 comments on commit d24dce2

Please sign in to comment.