Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix local pv stress tests #73446

Merged
merged 1 commit into from
Jan 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions test/e2e/storage/persistent_volumes-local.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,9 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {

BeforeEach(func() {
setupStorageClass(config, &waitMode)
for _, node := range config.nodes {
for i, node := range config.nodes {
By(fmt.Sprintf("Setting up %d local volumes on node %q", volsPerNode, node.Name))
allLocalVolumes[node.Name] = setupLocalVolumes(config, volType, &node, volsPerNode)
allLocalVolumes[node.Name] = setupLocalVolumes(config, volType, &config.nodes[i], volsPerNode)
}
By(fmt.Sprintf("Create %d PVs", volsPerNode*len(config.nodes)))
var err error
Expand Down Expand Up @@ -513,14 +513,15 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
})

AfterEach(func() {
By("Stop and wait for recycle goroutine to finish")
close(stopCh)
wg.Wait()
By("Clean all PVs")
for nodeName, localVolumes := range allLocalVolumes {
By(fmt.Sprintf("Cleaning up %d local volumes on node %q", len(localVolumes), nodeName))
cleanupLocalVolumes(config, localVolumes)
}
cleanupStorageClass(config)
By("Wait for recycle goroutine to finish")
close(stopCh)
wg.Wait()
})

It("should be able to process many pods and reuse local volumes", func() {
Expand Down