Skip to content

Commit

Permalink
test: fix containerd Windows e2e test failure
Browse files Browse the repository at this point in the history
fix deployment test
  • Loading branch information
andyzhangx committed May 7, 2021
1 parent 53ebdf0 commit 9e3209c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions hack/verify-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ if [[ "$1" == "windows" ]]; then
kubectl apply -f deploy/example/storageclass-azurefile-csi.yaml
kubectl apply -f deploy/example/windows/deployment.yaml
kubectl apply -f deploy/example/windows/statefulset.yaml
echo "sleep 240s ..."
sleep 240
echo "sleep 360s ..."
sleep 360
fi

echo "begin to check pod status ..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
package testsuites

import (
"time"

"sigs.k8s.io/azurefile-csi-driver/test/e2e/driver"

"github.com/onsi/ginkgo"
Expand Down Expand Up @@ -53,7 +55,8 @@ func (t *DynamicallyProvisionedDeletePodTest) Run(client clientset.Interface, na
tDeployment.WaitForPodReady()

if t.PodCheck != nil {
ginkgo.By("checking pod exec")
time.Sleep(time.Second)
ginkgo.By("sleep 1s and then check pod exec")
tDeployment.Exec(t.PodCheck.Cmd, t.PodCheck.ExpectedString)
}

Expand All @@ -64,7 +67,8 @@ func (t *DynamicallyProvisionedDeletePodTest) Run(client clientset.Interface, na
tDeployment.WaitForPodReady()

if t.PodCheck != nil {
ginkgo.By("checking pod exec")
time.Sleep(time.Second)
ginkgo.By("sleep 1s and then check pod exec")
// pod will be restarted so expect to see 2 instances of string
tDeployment.Exec(t.PodCheck.Cmd, t.PodCheck.ExpectedString+t.PodCheck.ExpectedString)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
package testsuites

import (
"time"

"github.com/onsi/ginkgo"
v1 "k8s.io/api/core/v1"
clientset "k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -46,7 +48,8 @@ func (t *DynamicallyProvisionedStatefulSetTest) Run(client clientset.Interface,
tStatefulSet.WaitForPodReady()

if t.PodCheck != nil {
ginkgo.By("checking pod exec")
time.Sleep(time.Second)
ginkgo.By("sleep 1s and then check pod exec")
tStatefulSet.Exec(t.PodCheck.Cmd, t.PodCheck.ExpectedString)
}

Expand All @@ -57,7 +60,8 @@ func (t *DynamicallyProvisionedStatefulSetTest) Run(client clientset.Interface,
tStatefulSet.WaitForPodReady()

if t.PodCheck != nil {
ginkgo.By("checking pod exec after pod restart again")
time.Sleep(time.Second)
ginkgo.By("sleep 1s and then check pod exec after pod restart again")
// pod will be restarted so expect to see 2 instances of string
tStatefulSet.Exec(t.PodCheck.Cmd, t.PodCheck.ExpectedString+t.PodCheck.ExpectedString)
}
Expand Down

0 comments on commit 9e3209c

Please # to comment.