Skip to content

Commit

Permalink
test: fix test leak by disabling expiration e2e (#5606)
Browse files Browse the repository at this point in the history
  • Loading branch information
njtran authored Feb 6, 2024
1 parent d50d00e commit e8ad923
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/suites/expiration/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,16 @@ var _ = Describe("Expiration", func() {
env.EventuallyExpectNodeCount("==", 8)
nodes = env.ConsistentlyExpectDisruptionsWithNodeCount(3, 8, 5*time.Second)

// Set the expireAfter to "Never" to make sure new node isn't deleted
// This is CRITICAL since it prevents nodes that are immediately spun up from immediately being expired and
// racing at the end of the E2E test, leaking node resources into subsequent tests
nodePool.Spec.Disruption.ExpireAfter.Duration = nil
env.ExpectUpdated(nodePool)

for _, node := range nodes {
Expect(env.ExpectTestingFinalizerRemoved(node)).To(Succeed())
}

env.EventuallyExpectNotFound(nodes[0], nodes[1], nodes[2])
env.ExpectNodeCount("==", 5)
})
Expand Down

0 comments on commit e8ad923

Please sign in to comment.