diff --git a/pkg/sanity/controller.go b/pkg/sanity/controller.go index 3d21f76e..0f7d23e9 100644 --- a/pkg/sanity/controller.go +++ b/pkg/sanity/controller.go @@ -259,11 +259,18 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *Sanity Expect(len(vols.GetEntries())).To(Equal(totalVols)) }) - It("pagination should detect volumes added between pages and accept tokens when the last volume from a page is deleted", func() { + // Disabling this below case as it is fragile and results are inconsistent + // when no of volumes are different. The test might fail on a driver + // which implements the pagination based on index just by altering + // minVolCount := 4 and maxEntries := 3 + // Related discussion links: + // https://github.com/intel/pmem-csi/pull/424#issuecomment-540499938 + // https://github.com/kubernetes-csi/csi-test/issues/223 + XIt("pagination should detect volumes added between pages and accept tokens when the last volume from a page is deleted", func() { // minVolCount is the minimum number of volumes expected to exist, // based on which paginated volume listing is performed. minVolCount := 3 - // maxEntried is the maximum entries in list volume request. + // maxEntries is the maximum entries in list volume request. maxEntries := 2 // existing_vols to keep a record of the volumes that should exist existing_vols := map[string]bool{} @@ -358,6 +365,8 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *Sanity Expect(err).NotTo(HaveOccurred()) Expect(vol).NotTo(BeNil()) Expect(vol.Volume).NotTo(BeNil()) + // Register the volume so it's automatically cleaned + cl.RegisterVolume(vol.Volume.VolumeId, VolumeInfo{VolumeID: vol.Volume.VolumeId}) existing_vols[vol.Volume.VolumeId] = true vols, err = c.ListVolumes(