Commit 4d481a0f authored by Hemant Kumar's avatar Hemant Kumar

Fix flake associated with time out volumes

This test is suspectible to flakes because sometimes while we verify if volume is attached to a node, reconciler loop can turn second time and it can confirm the volume as attached.
parent b5336132
......@@ -907,6 +907,11 @@ func (fv *FakeVolume) Attach(spec *Spec, nodeName types.NodeName) (string, error
if nodeName == UncertainAttachNode {
return "/dev/vdb-test", nil
}
// even if volume was previously attached to time out, we need to keep returning error
// so as reconciler can not confirm this volume as attached.
if nodeName == TimeoutAttachNode {
return "", fmt.Errorf("Timed out to attach volume %q to node %q", volumeName, nodeName)
}
if volumeNode == nodeName || volumeNode == MultiAttachNode || nodeName == MultiAttachNode {
return "/dev/vdb-test", nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment