Skip to content

Commit

Permalink
Merge pull request #19266 from smarterclayton/wait_stress
Browse files Browse the repository at this point in the history
Wait until other routers have written their status
  • Loading branch information
openshift-merge-robot authored Apr 9, 2018
2 parents 435f98f + 5090074 commit c8e064b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/extended/router/stress.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,20 +211,29 @@ var _ = g.Describe("[Conformance][Area:Networking][Feature:Router]", func() {
return false, err
}
o.Expect(routes.Items).To(o.HaveLen(10))
other := 0
conflicting := 0
for _, route := range routes.Items {
ingress := findIngress(&route, "conflicting")
if ingress == nil {
if len(route.Status.Ingress) > 0 {
other++
}
continue
}
if len(route.Status.Ingress) > 1 {
other++
}
conflicting++
o.Expect(ingress.Host).NotTo(o.BeEmpty())
o.Expect(ingress.Conditions).NotTo(o.BeEmpty())
o.Expect(ingress.Conditions[0].LastTransitionTime).NotTo(o.BeNil())
o.Expect(ingress.Conditions[0].Type).To(o.Equal(routev1.RouteAdmitted))
o.Expect(ingress.Conditions[0].Status).To(o.Equal(corev1.ConditionTrue))
}
if conflicting < 3 {
// if other routers are writing status, wait until we get a complete
// set since we don't have a way to tell other routers to ignore us
if conflicting < 3 && other%10 != 0 {
return false, nil
}
outputIngress(routes.Items...)
Expand Down

0 comments on commit c8e064b

Please sign in to comment.