Skip to content

Commit 4bb9b01

Browse files
committed
fix timeout to wait daemonset
1 parent 9030091 commit 4bb9b01

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

test/e2e/common/ds.go

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import (
1313
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1414
"k8s.io/apimachinery/pkg/types"
1515
"sigs.k8s.io/controller-runtime/pkg/client"
16+
17+
. "github.com/onsi/ginkgo/v2"
1618
)
1719

1820
func CreateDaemonSet(ctx context.Context, cli client.Client, name string, image string, timeout time.Duration) (*appsv1.DaemonSet, error) {
@@ -64,6 +66,10 @@ func CreateDaemonSet(ctx context.Context, cli client.Client, name string, image
6466
b := res.Status.DesiredNumberScheduled
6567
c := res.Status.NumberAvailable
6668

69+
GinkgoWriter.Printf("=======sundebug========res.Status.CurrentNumberScheduled: %v\n", res.Status.CurrentNumberScheduled)
70+
GinkgoWriter.Printf("=======sundebug========res.Status.DesiredNumberScheduled: %v\n", res.Status.DesiredNumberScheduled)
71+
GinkgoWriter.Printf("=======sundebug========res.Status.NumberAvailable: %v\n", res.Status.NumberAvailable)
72+
6773
if a == b && b == c && a > 0 {
6874
return res, nil
6975
}

test/e2e/reliability/reliability_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,13 @@ var _ = Describe("Reliability", Serial, Label("Reliability"), func() {
290290
Expect(err).NotTo(HaveOccurred())
291291
Expect(nowEgep.Endpoints).Should(Equal(beforeEgep.Endpoints), fmt.Sprintf("expect:\n%v\ngot:\n %v\n", beforeEgep.Endpoints, nowEgep.Endpoints))
292292
},
293-
Entry("restart kube-controller-manager", constant.KubeControllerManagerLabel, time.Minute*2),
294-
Entry("restart kube-apiserver", constant.KubeApiServerLabel, time.Minute*2),
295-
Entry("restart etcd", constant.KubeEtcdLabel, time.Minute*2),
296-
Entry("restart kube-scheduler", constant.KubeSchedulerLabel, time.Minute*2),
297-
Entry("restart kube-proxy", constant.KubeProxyLabel, time.Minute*2),
298-
Entry("restart calico-node", constant.CalicoNodeLabel, time.Minute*2),
299-
Entry("restart calico-kube-controllers", constant.CalicoControllerLabel, time.Minute*2),
293+
Entry("restart kube-controller-manager", Serial, constant.KubeControllerManagerLabel, time.Minute*2),
294+
Entry("restart kube-apiserver", Serial, constant.KubeApiServerLabel, time.Minute*2),
295+
Entry("restart etcd", Serial, constant.KubeEtcdLabel, time.Minute*2),
296+
Entry("restart kube-scheduler", Serial, constant.KubeSchedulerLabel, time.Minute*2),
297+
Entry("restart kube-proxy", Label("xxx"), Serial, constant.KubeProxyLabel, time.Minute*2),
298+
Entry("restart calico-node", Serial, constant.CalicoNodeLabel, time.Minute*2),
299+
Entry("restart calico-kube-controllers", Serial, constant.CalicoControllerLabel, time.Minute*2),
300300
)
301301
})
302302

0 commit comments

Comments
 (0)