Skip to content

Commit

Permalink
Merge pull request #1391 from rzetelskik/orphaned-pv-fix
Browse files Browse the repository at this point in the history
Fix waiting for waitGroup in ScyllaCluster Orphaned PV e2e test
  • Loading branch information
scylla-operator-bot[bot] authored Sep 11, 2023
2 parents 40239f1 + e10e114 commit 6d28dca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/e2e/set/scyllacluster/scyllacluster_pv.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ var _ = g.Describe("ScyllaCluster Orphaned PV controller", func() {
// ScyllaCluster is going to request a PVC from that StorageClass, and the test is going to request a clone of the original PVC
// from the default StorageClass to get any storage. Then the bound PV is rebounded to the original PVC
// but with empty NodeAffinity. This allows the test to trigger the orphaned PV cleanup logic.
provisionerCtx, provisionerCancel := context.WithCancel(ctx)
var wg sync.WaitGroup
defer wg.Wait()

provisionerCtx, provisionerCancel := context.WithCancel(context.Background())
defer provisionerCancel()

var wg sync.WaitGroup
wg.Add(1)
go func() {
defer wg.Done()
Expand Down Expand Up @@ -252,7 +254,6 @@ var _ = g.Describe("ScyllaCluster Orphaned PV controller", func() {
}
o.Expect(err).NotTo(o.HaveOccurred())
}()
defer wg.Wait()

framework.By("Creating a ScyllaCluster")
sc, err = f.ScyllaClient().ScyllaV1().ScyllaClusters(f.Namespace()).Create(ctx, sc, metav1.CreateOptions{})
Expand Down

0 comments on commit 6d28dca

Please sign in to comment.