Fix the flaky TestTeamStoreSearchByName test in store/sql_team_store_test.go (#6187)

This commit is contained in:
Justin Wyer
2017-04-24 13:28:11 +02:00
committed by George Goldberg
parent ecb10ed62f
commit 788df7a4bd

View File

@@ -138,7 +138,8 @@ func TestTeamStoreSearchByName(t *testing.T) {
o1 := model.Team{}
o1.DisplayName = "DisplayName"
o1.Name = "zzz" + model.NewId() + "b"
var name = "zzz" + model.NewId()
o1.Name = name + "b"
o1.Email = model.NewId() + "@nowhere.com"
o1.Type = model.TEAM_OPEN
@@ -146,7 +147,7 @@ func TestTeamStoreSearchByName(t *testing.T) {
t.Fatal(err)
}
if r1 := <-store.Team().SearchByName("zzz"); r1.Err != nil {
if r1 := <-store.Team().SearchByName(name); r1.Err != nil {
t.Fatal(r1.Err)
} else {
if r1.Data.([]*model.Team)[0].ToJson() != o1.ToJson() {