Skip to content

Commit 851f838

Browse files
denyeartsykesm
andauthored
Fix process termination waits in health tests (#2889)
The current code is passing a function to `Eventually` that returns a channel instead of the channel to wait on. Signed-off-by: Matthew Sykes <[email protected]> Co-authored-by: Matthew Sykes <[email protected]>
1 parent e6a6a61 commit 851f838

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

integration/e2e/health_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var _ = Describe("Health", func() {
5252
AfterEach(func() {
5353
if process != nil {
5454
process.Signal(syscall.SIGTERM)
55-
Eventually(process.Wait, network.EventuallyTimeout).Should(Receive())
55+
Eventually(process.Wait(), network.EventuallyTimeout).Should(Receive())
5656
}
5757
if network != nil {
5858
network.Cleanup()
@@ -169,16 +169,16 @@ var _ = Describe("Health", func() {
169169
AfterEach(func() {
170170
if zProcess != nil {
171171
zProcess.Signal(syscall.SIGTERM)
172-
Eventually(zProcess.Wait, network.EventuallyTimeout).Should(Receive())
172+
Eventually(zProcess.Wait(), network.EventuallyTimeout).Should(Receive())
173173
}
174174
if oProcess != nil {
175175
oProcess.Signal(syscall.SIGTERM)
176-
Eventually(oProcess.Wait, network.EventuallyTimeout).Should(Receive())
176+
Eventually(oProcess.Wait(), network.EventuallyTimeout).Should(Receive())
177177
}
178178
for _, k := range kProcess {
179179
if k != nil {
180180
k.Signal(syscall.SIGTERM)
181-
Eventually(k.Wait, network.EventuallyTimeout).Should(Receive())
181+
Eventually(k.Wait(), network.EventuallyTimeout).Should(Receive())
182182
}
183183
}
184184
})
@@ -194,7 +194,7 @@ var _ = Describe("Health", func() {
194194
By("returning a 200 when one of the three brokers goes offline", func() {
195195
k := kProcess[1]
196196
k.Signal(syscall.SIGTERM)
197-
Eventually(k.Wait, network.EventuallyTimeout).Should(Receive())
197+
Eventually(k.Wait(), network.EventuallyTimeout).Should(Receive())
198198

199199
var statusCode int
200200
var status *healthz.HealthStatus
@@ -208,7 +208,7 @@ var _ = Describe("Health", func() {
208208
By("returning a 503 when two of the three brokers go offline", func() {
209209
k := kProcess[0]
210210
k.Signal(syscall.SIGTERM)
211-
Eventually(k.Wait, network.EventuallyTimeout).Should(Receive())
211+
Eventually(k.Wait(), network.EventuallyTimeout).Should(Receive())
212212

213213
var statusCode int
214214
var status *healthz.HealthStatus

0 commit comments

Comments
 (0)