volume integration: wait for PVs before creating PVCs
The test should wait until all volumes are processed by volume controller (i.e. in the controller cache) before creating a PVC. Without that, the "best" matching PV could not be in the cache and controller might bind the PVC to suboptiomal one. This fixes integration test flake "Bind mismatch! Expected pvc-2 capacity 50000000000 but got pvc-2 capacity 52000000000".
This commit is contained in:
@@ -250,6 +250,7 @@ func TestPersistentVolumeMultiPVs(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Errorf("Failed to create PersistentVolume %d: %v", i, err)
|
||||
}
|
||||
waitForPersistentVolumePhase(testClient, pvs[i].Name, watchPV, api.VolumeAvailable)
|
||||
}
|
||||
t.Log("volumes created")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user