Retry calls to ReadFileViaContainer in PD tests
This commit is contained in:
@@ -118,11 +118,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() {
|
|||||||
|
|
||||||
framework.ExpectNoError(f.WaitForPodRunningSlow(host1Pod.Name))
|
framework.ExpectNoError(f.WaitForPodRunningSlow(host1Pod.Name))
|
||||||
|
|
||||||
v, err := f.ReadFileViaContainer(host1Pod.Name, containerName, testFile)
|
verifyPDContentsViaContainer(f, host1Pod.Name, containerName, map[string]string{testFile: testFileContents})
|
||||||
framework.ExpectNoError(err)
|
|
||||||
framework.Logf("Read value: %v", v)
|
|
||||||
|
|
||||||
Expect(strings.TrimSpace(v)).To(Equal(strings.TrimSpace(testFileContents)))
|
|
||||||
|
|
||||||
// Verify that disk is removed from node 1's VolumeInUse list
|
// Verify that disk is removed from node 1's VolumeInUse list
|
||||||
framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, false /* shouldExist */))
|
framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, false /* shouldExist */))
|
||||||
@@ -182,11 +178,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() {
|
|||||||
|
|
||||||
framework.ExpectNoError(f.WaitForPodRunningSlow(host1Pod.Name))
|
framework.ExpectNoError(f.WaitForPodRunningSlow(host1Pod.Name))
|
||||||
|
|
||||||
v, err := f.ReadFileViaContainer(host1Pod.Name, containerName, testFile)
|
verifyPDContentsViaContainer(f, host1Pod.Name, containerName, map[string]string{testFile: testFileContents})
|
||||||
framework.ExpectNoError(err)
|
|
||||||
framework.Logf("Read value: %v", v)
|
|
||||||
|
|
||||||
Expect(strings.TrimSpace(v)).To(Equal(strings.TrimSpace(testFileContents)))
|
|
||||||
|
|
||||||
// Verify that disk is removed from node 1's VolumeInUse list
|
// Verify that disk is removed from node 1's VolumeInUse list
|
||||||
framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, false /* shouldExist */))
|
framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, false /* shouldExist */))
|
||||||
|
Reference in New Issue
Block a user