Skip to content

Commit 1d487f9

Browse files
committed
update bad url endpoint termination handler test
This change moves the bad url test to its own `Context` block so that it does not get caught in the mock termination service counter. In some cases it is possible for the bad url test to be run first, when this happens the counter will never advance because the url is not valid. This produces a dead lock condition in the test. Migrating the test to its own block alleviates this issue.
1 parent 2f90c4f commit 1d487f9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/termination/termination_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ var _ = Describe("Handler Suite", func() {
182182
Consistently(nodeMarkedForDeletion(testNode.Name)).Should(BeFalse())
183183
})
184184
})
185+
})
185186

187+
Context("when the termination endpoint is invalid", func() {
186188
Context("and the poll URL cannot be reached", func() {
187189
BeforeEach(func() {
188190
h.pollURL = &url.URL{Opaque: "abc#1://localhost"}

0 commit comments

Comments
 (0)