Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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