Skip to content

Commit

Permalink
test: Fix Prefix Delegation enabling race condition (#5172)
Browse files Browse the repository at this point in the history
  • Loading branch information
engedaam authored Nov 28, 2023
1 parent d0497cd commit f5f32bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions test/suites/scale/provisioning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ var _ = Describe("Provisioning", Label(debug.NoWatch), Label(debug.NoEvents), fu
// that will be allocated across this large number of nodes, despite the fact that the ENI CIDR space will
// be extremely under-utilized
env.ExpectPrefixDelegationDisabled()
DeferCleanup(func() {
env.ExpectPrefixDelegationEnabled()
})

replicasPerNode := 1
expectedNodeCount := 500
Expand Down
4 changes: 2 additions & 2 deletions test/suites/scale/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ func TestScale(t *testing.T) {
RegisterFailHandler(Fail)
BeforeSuite(func() {
env = aws.NewEnvironment(t)
env.ExpectPrefixDelegationEnabled()
SetDefaultEventuallyTimeout(time.Hour)
})
AfterSuite(func() {
env.ExpectPrefixDelegationDisabled()
env.Stop()
})
RunSpecs(t, "Scale")
}

var _ = BeforeEach(func() {
env.ExpectPrefixDelegationEnabled()
env.BeforeEach()
})
var _ = AfterEach(func() { env.Cleanup() })
var _ = AfterEach(func() {
env.AfterEach()
env.ExpectPrefixDelegationDisabled()
})

0 comments on commit f5f32bf

Please sign in to comment.