Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix flappy integration test #785

Merged
merged 5 commits into from
Jan 28, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions go/inst/instance_key_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package inst

import (
"encoding/json"
"sort"
"strings"
)

Expand Down Expand Up @@ -59,6 +60,9 @@ func (this *InstanceKeyMap) GetInstanceKeys() []InstanceKey {
for key := range *this {
res = append(res, key)
}
sort.Slice(res, func(i, j int) bool {
return res[i].Hostname < res[j].Hostname || res[i].Hostname == res[j].Hostname && res[i].Port < res[j].Port
})
return res
}

Expand Down