Skip to content

Commit

Permalink
Merge pull request #16326 from bparees/replica_tests
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 16295, 16314, 16326, 16111)

increase waiting for pods to start due to delays from running in parallel
  • Loading branch information
openshift-merge-robot authored Sep 13, 2017
2 parents 9110089 + 0653f95 commit b26288c
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion test/extended/image_ecosystem/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

// RunInPodContainer will run provided command in the specified pod container.
func RunInPodContainer(oc *exutil.CLI, selector labels.Selector, cmd []string) error {
pods, err := exutil.WaitForPods(oc.KubeClient().CoreV1().Pods(oc.Namespace()), selector, exutil.CheckPodIsRunningFn, 1, 2*time.Minute)
pods, err := exutil.WaitForPods(oc.KubeClient().CoreV1().Pods(oc.Namespace()), selector, exutil.CheckPodIsRunningFn, 1, 4*time.Minute)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion test/extended/image_ecosystem/mongodb_ephemeral.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var _ = g.Describe("[image_ecosystem][mongodb] openshift mongodb image", func()
exutil.ParseLabelsOrDie("name=mongodb"),
exutil.CheckPodIsRunningFn,
1,
1*time.Minute,
4*time.Minute,
)
o.Expect(err).ShouldNot(o.HaveOccurred())
o.Expect(podNames).Should(o.HaveLen(1))
Expand Down
6 changes: 3 additions & 3 deletions test/extended/image_ecosystem/mongodb_replica_statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var _ = g.Describe("[Conformance][image_ecosystem][mongodb][Slow] openshift mong
exutil.ParseLabelsOrDie("name=mongodb-replicaset"),
exutil.CheckPodIsReadyFn,
3,
4*time.Minute,
8*time.Minute,
)
if err != nil {
desc, _ := oc.Run("describe").Args("statefulset").Output()
Expand Down Expand Up @@ -101,7 +101,7 @@ var _ = g.Describe("[Conformance][image_ecosystem][mongodb][Slow] openshift mong
exutil.ParseLabelsOrDie("name=mongodb-replicaset"),
func(pod kapiv1.Pod) bool { return pod.DeletionTimestamp != nil },
0,
2*time.Minute,
4*time.Minute,
)
o.Expect(err).NotTo(o.HaveOccurred())

Expand All @@ -111,7 +111,7 @@ var _ = g.Describe("[Conformance][image_ecosystem][mongodb][Slow] openshift mong
exutil.ParseLabelsOrDie("name=mongodb-replicaset"),
exutil.CheckPodIsReadyFn,
3,
2*time.Minute,
4*time.Minute,
)
o.Expect(err).NotTo(o.HaveOccurred())

Expand Down
6 changes: 3 additions & 3 deletions test/extended/image_ecosystem/mysql_replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ var (
// CreateMySQLReplicationHelpers creates a set of MySQL helpers for master,
// slave and an extra helper that is used for remote login test.
func CreateMySQLReplicationHelpers(c kcoreclient.PodInterface, masterDeployment, slaveDeployment, helperDeployment string, slaveCount int) (exutil.Database, []exutil.Database, exutil.Database) {
podNames, err := exutil.WaitForPods(c, exutil.ParseLabelsOrDie(fmt.Sprintf("deployment=%s", masterDeployment)), exutil.CheckPodIsRunningFn, 1, 1*time.Minute)
podNames, err := exutil.WaitForPods(c, exutil.ParseLabelsOrDie(fmt.Sprintf("deployment=%s", masterDeployment)), exutil.CheckPodIsRunningFn, 1, 4*time.Minute)
o.Expect(err).NotTo(o.HaveOccurred())
masterPod := podNames[0]

slavePods, err := exutil.WaitForPods(c, exutil.ParseLabelsOrDie(fmt.Sprintf("deployment=%s", slaveDeployment)), exutil.CheckPodIsRunningFn, slaveCount, 2*time.Minute)
slavePods, err := exutil.WaitForPods(c, exutil.ParseLabelsOrDie(fmt.Sprintf("deployment=%s", slaveDeployment)), exutil.CheckPodIsRunningFn, slaveCount, 6*time.Minute)
o.Expect(err).NotTo(o.HaveOccurred())

// Create MySQL helper for master
Expand All @@ -66,7 +66,7 @@ func CreateMySQLReplicationHelpers(c kcoreclient.PodInterface, masterDeployment,
slaves[i] = slave
}

helperNames, err := exutil.WaitForPods(c, exutil.ParseLabelsOrDie(fmt.Sprintf("deployment=%s", helperDeployment)), exutil.CheckPodIsRunningFn, 1, 1*time.Minute)
helperNames, err := exutil.WaitForPods(c, exutil.ParseLabelsOrDie(fmt.Sprintf("deployment=%s", helperDeployment)), exutil.CheckPodIsRunningFn, 1, 4*time.Minute)
o.Expect(err).NotTo(o.HaveOccurred())
helper := db.NewMysql(helperNames[0], masterPod)

Expand Down
6 changes: 3 additions & 3 deletions test/extended/image_ecosystem/postgresql_replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ var _ = g.Describe("[image_ecosystem][postgresql][Slow][local] openshift postgre
// CreatePostgreSQLReplicationHelpers creates a set of PostgreSQL helpers for master,
// slave an en extra helper that is used for remote login test.
func CreatePostgreSQLReplicationHelpers(c kcoreclient.PodInterface, masterDeployment, slaveDeployment, helperDeployment string, slaveCount int) (exutil.Database, []exutil.Database, exutil.Database) {
podNames, err := exutil.WaitForPods(c, exutil.ParseLabelsOrDie(fmt.Sprintf("deployment=%s", masterDeployment)), exutil.CheckPodIsRunningFn, 1, 2*time.Minute)
podNames, err := exutil.WaitForPods(c, exutil.ParseLabelsOrDie(fmt.Sprintf("deployment=%s", masterDeployment)), exutil.CheckPodIsRunningFn, 1, 4*time.Minute)
o.Expect(err).NotTo(o.HaveOccurred())
masterPod := podNames[0]

slavePods, err := exutil.WaitForPods(c, exutil.ParseLabelsOrDie(fmt.Sprintf("deployment=%s", slaveDeployment)), exutil.CheckPodIsRunningFn, slaveCount, 3*time.Minute)
slavePods, err := exutil.WaitForPods(c, exutil.ParseLabelsOrDie(fmt.Sprintf("deployment=%s", slaveDeployment)), exutil.CheckPodIsRunningFn, slaveCount, 6*time.Minute)
o.Expect(err).NotTo(o.HaveOccurred())

// Create PostgreSQL helper for master
Expand All @@ -58,7 +58,7 @@ func CreatePostgreSQLReplicationHelpers(c kcoreclient.PodInterface, masterDeploy
slaves[i] = slave
}

helperNames, err := exutil.WaitForPods(c, exutil.ParseLabelsOrDie(fmt.Sprintf("deployment=%s", helperDeployment)), exutil.CheckPodIsRunningFn, 1, 1*time.Minute)
helperNames, err := exutil.WaitForPods(c, exutil.ParseLabelsOrDie(fmt.Sprintf("deployment=%s", helperDeployment)), exutil.CheckPodIsRunningFn, 1, 4*time.Minute)
o.Expect(err).NotTo(o.HaveOccurred())
helper := db.NewPostgreSQL(helperNames[0], masterPod)

Expand Down
2 changes: 1 addition & 1 deletion test/extended/image_ecosystem/s2i_perl.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var _ = g.Describe("[image_ecosystem][perl][Slow] hot deploy for openshift perl
o.Expect(err).NotTo(o.HaveOccurred())

assertPageCountIs := func(i int, dcLabel labels.Selector) {
_, err := exutil.WaitForPods(oc.KubeClient().Core().Pods(oc.Namespace()), dcLabel, exutil.CheckPodIsRunningFn, 1, 2*time.Minute)
_, err := exutil.WaitForPods(oc.KubeClient().Core().Pods(oc.Namespace()), dcLabel, exutil.CheckPodIsRunningFn, 1, 4*time.Minute)
o.ExpectWithOffset(1, err).NotTo(o.HaveOccurred())

result, err := CheckPageContains(oc, dcName, "", pageCountFn(i))
Expand Down
2 changes: 1 addition & 1 deletion test/extended/image_ecosystem/s2i_php.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var _ = g.Describe("[image_ecosystem][php][Slow] hot deploy for openshift php im
o.Expect(err).NotTo(o.HaveOccurred())

assertPageCountIs := func(i int) {
_, err := exutil.WaitForPods(oc.KubeClient().Core().Pods(oc.Namespace()), dcLabel, exutil.CheckPodIsRunningFn, 1, 2*time.Minute)
_, err := exutil.WaitForPods(oc.KubeClient().Core().Pods(oc.Namespace()), dcLabel, exutil.CheckPodIsRunningFn, 1, 4*time.Minute)
o.ExpectWithOffset(1, err).NotTo(o.HaveOccurred())

result, err := CheckPageContains(oc, "cakephp-mysql-example", "", pageCountFn(i))
Expand Down
2 changes: 1 addition & 1 deletion test/extended/image_ecosystem/s2i_python.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var _ = g.Describe("[image_ecosystem][python][Slow] hot deploy for openshift pyt
o.Expect(err).NotTo(o.HaveOccurred())

assertPageCountIs := func(i int, dcLabel labels.Selector) {
_, err := exutil.WaitForPods(oc.KubeClient().Core().Pods(oc.Namespace()), dcLabel, exutil.CheckPodIsRunningFn, 1, 2*time.Minute)
_, err := exutil.WaitForPods(oc.KubeClient().Core().Pods(oc.Namespace()), dcLabel, exutil.CheckPodIsRunningFn, 1, 4*time.Minute)
o.ExpectWithOffset(1, err).NotTo(o.HaveOccurred())

result, err := CheckPageContains(oc, dcName, "", pageCountFn(i))
Expand Down
2 changes: 1 addition & 1 deletion test/extended/image_ecosystem/s2i_ruby.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var _ = g.Describe("[image_ecosystem][ruby][Slow] hot deploy for openshift ruby
o.Expect(err).NotTo(o.HaveOccurred())

assertPageContent := func(content string, dcLabel labels.Selector) {
_, err := exutil.WaitForPods(oc.KubeClient().Core().Pods(oc.Namespace()), dcLabel, exutil.CheckPodIsRunningFn, 1, 2*time.Minute)
_, err := exutil.WaitForPods(oc.KubeClient().Core().Pods(oc.Namespace()), dcLabel, exutil.CheckPodIsRunningFn, 1, 4*time.Minute)
o.ExpectWithOffset(1, err).NotTo(o.HaveOccurred())

result, err := CheckPageContains(oc, dcName, "", content)
Expand Down

0 comments on commit b26288c

Please sign in to comment.