Skip to content

Commit 9184744

Browse files
committed
ext4 60s
1 parent d3550c9 commit 9184744

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/e2e/metriconly/metrics_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ var _ = ginkgo.Describe("NPD should export Prometheus metrics.", func() {
125125
ginkgo.Context("When ext4 filesystem error happens", func() {
126126

127127
ginkgo.BeforeEach(func() {
128-
err := npd.WaitForNPD(instance, []string{"problem_gauge"}, 300)
129-
Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Expect NPD to become ready in 300s, but hit error: %v", err))
128+
err := npd.WaitForNPD(instance, []string{"problem_gauge"}, 120)
129+
Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Expect NPD to become ready in 120s, but hit error: %v", err))
130130
// This will trigger a ext4 error on the boot disk, causing the boot disk mounted as read-only and systemd-journald crashing.
131131
instance.RunCommandOrFail("sudo /home/kubernetes/bin/problem-maker --problem Ext4FilesystemError")
132132
})
133133

134134
ginkgo.It("NPD should update problem_counter{reason:Ext4Error} and problem_gauge{type:ReadonlyFilesystem}", func() {
135-
time.Sleep(5 * time.Second)
135+
time.Sleep(60 * time.Second)
136136
assertMetricValueAtLeast(instance,
137137
"problem_counter", map[string]string{"reason": "Ext4Error"},
138138
1.0)
@@ -142,6 +142,7 @@ var _ = ginkgo.Describe("NPD should export Prometheus metrics.", func() {
142142
})
143143

144144
ginkgo.It("NPD should remain healthy", func() {
145+
time.Sleep(60 * time.Second)
145146
npdStates := instance.RunCommandOrFail("sudo systemctl show node-problem-detector -p ActiveState -p SubState")
146147
Expect(npdStates.Stdout).To(ContainSubstring("ActiveState=active"), "NPD is no longer active: %v", npdStates)
147148
Expect(npdStates.Stdout).To(ContainSubstring("SubState=running"), "NPD is no longer running: %v", npdStates)

0 commit comments

Comments
 (0)