Skip to content

Commit

Permalink
Merge pull request #3721 from jcaamano/fix-unidling-test
Browse files Browse the repository at this point in the history
Fix unidling test panic after not waiting to be done
  • Loading branch information
trozet committed Jun 29, 2023
2 parents 69f4500 + 78eecc5 commit 7e63fb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/e2e/unidling.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,21 @@ var _ = ginkgo.Describe("Unidling", func() {
framework.ExpectNoError(err)

var wg sync.WaitGroup
done := make(chan struct{})
wg.Add(1)
go func() {
defer ginkgo.GinkgoRecover()
wg.Done()

time.Sleep(time.Second)
createBackend(f, serviceName, namespace, node, jig.Labels, port)
close(done)
}()
wg.Wait()

// Connecting to the service should work at the first attempt
gomega.Expect(checkService(clientPod, cmd)).To(gomega.Equal(works))
<-done
})
})

Expand Down

0 comments on commit 7e63fb7

Please sign in to comment.