larger time

This commit is contained in:
天元
2021-01-05 19:31:11 +08:00
parent c72941f916
commit 8c7db9b0e0
2 changed files with 4 additions and 9 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ func Exec(cli string) (string, error) {
if err != nil {
return string(output), err
}
s := session.Wait(30 * time.Second)
s := session.Wait(1200 * time.Second)
return string(s.Out.Contents()) + string(s.Err.Contents()), nil
}
+3 -8
View File
@@ -209,20 +209,15 @@ var (
k8sclient, err := newK8sClient()
gomega.Expect(err).NotTo(gomega.HaveOccurred())
cli := fmt.Sprintf("kubectl -n %s get application %s -o yaml", envName, applicationName)
output, err := Exec(cli)
gomega.Expect(err).NotTo(gomega.HaveOccurred())
gomega.Expect(output).To(gomega.ContainSubstring(applicationName))
ginkgo.By("check AppConfig reconciled ready")
gomega.Eventually(func() int {
appConfig := &corev1alpha2.ApplicationConfiguration{}
_ = k8sclient.Get(ctx.Background(), client.ObjectKey{Name: applicationName, Namespace: "default"}, appConfig)
return len(appConfig.Status.Workloads)
}, 200*time.Second, 1*time.Second).ShouldNot(gomega.Equal(0))
}, 1200*time.Second, 1*time.Second).ShouldNot(gomega.Equal(0))
cli = fmt.Sprintf("vela status %s", applicationName)
output, err = LongTimeExec(cli, 120*time.Second)
cli := fmt.Sprintf("vela status %s", applicationName)
output, err := LongTimeExec(cli, 120*time.Second)
gomega.Expect(err).NotTo(gomega.HaveOccurred())
gomega.Expect(output).To(gomega.ContainSubstring("Checking health status"))
// TODO(zzxwill) need to check workloadType after app status is refined