mirror of https://github.com/k3s-io/k3s
Merge pull request #1914 from smarterclayton/fix_pod_test_race
Sort of pods in test case was incorrectpull/6/head
commit
0780e2839a
|
@ -42,7 +42,10 @@ func (s sortedPods) Swap(i, j int) {
|
|||
s[i], s[j] = s[j], s[i]
|
||||
}
|
||||
func (s sortedPods) Less(i, j int) bool {
|
||||
return s[i].ID < s[j].ID && s[i].Namespace < s[j].Namespace
|
||||
if s[i].Namespace < s[j].Namespace {
|
||||
return true
|
||||
}
|
||||
return s[i].ID < s[j].ID
|
||||
}
|
||||
|
||||
func CreateValidPod(name, namespace, source string) api.BoundPod {
|
||||
|
|
Loading…
Reference in New Issue