csi-test
csi-test copied to clipboard
CSI sanity test 'check the presence of new volumes and absence of deleted ones in the volume list' can fail when server isn't idle
The test (in pkg/sanity/controller.go) steps: Step 1: The test checks how many volumes are already present: vols, err := c.ListVolumes( context.Background(), &csi.ListVolumesRequest{}) totalVols := len(vols.GetEntries())
Step 2: The test adds and deletes a volume
Step 3: The test checks how many volumes are present again
vols, err = c.ListVolumes( context.Background(), &csi.ListVolumesRequest{}) Expect(len(vols.GetEntries())).To(Equal(totalVols))
The issue is that if someone else is using the server, the second time ListVolumesResponse.GetEntries is called, it is not guaranteed to be the same as when it was called the first time. The test is not accounting for other volumes being made/deleted while it runs, which can cause it to fail sometimes.
That is correct. Any suggestions for how to solve this?
Maybe only check volumes that have the prefix of "sanity"?
/help /kind bug
@msau42: This request has been marked as needing help from a contributor.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.
In response to this:
/help /kind bug
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
/lifecycle frozen