@@ -125,14 +125,14 @@ var _ = ginkgo.Describe("NPD should export Prometheus metrics.", func() {
125
125
ginkgo .Context ("When ext4 filesystem error happens" , func () {
126
126
127
127
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 ))
130
130
// This will trigger a ext4 error on the boot disk, causing the boot disk mounted as read-only and systemd-journald crashing.
131
131
instance .RunCommandOrFail ("sudo /home/kubernetes/bin/problem-maker --problem Ext4FilesystemError" )
132
132
})
133
133
134
134
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 )
136
136
assertMetricValueAtLeast (instance ,
137
137
"problem_counter" , map [string ]string {"reason" : "Ext4Error" },
138
138
1.0 )
@@ -142,6 +142,7 @@ var _ = ginkgo.Describe("NPD should export Prometheus metrics.", func() {
142
142
})
143
143
144
144
ginkgo .It ("NPD should remain healthy" , func () {
145
+ time .Sleep (60 * time .Second )
145
146
npdStates := instance .RunCommandOrFail ("sudo systemctl show node-problem-detector -p ActiveState -p SubState" )
146
147
Expect (npdStates .Stdout ).To (ContainSubstring ("ActiveState=active" ), "NPD is no longer active: %v" , npdStates )
147
148
Expect (npdStates .Stdout ).To (ContainSubstring ("SubState=running" ), "NPD is no longer running: %v" , npdStates )
0 commit comments