Skip to content

Commit

Permalink
Ramp up timeout when calling k8s api
Browse files Browse the repository at this point in the history
to get RabbitMQCluster resource.
Also provided a description of asserted
generation values to help troubleshoot
when it occurs.
  • Loading branch information
MarcialRosales committed Oct 20, 2021
1 parent 7abef6a commit 49f10a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions system_tests/system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ var _ = Describe("Operator", func() {
Expect(rmqClusterClient.Delete(context.TODO(), cluster)).To(Succeed())
})

It("works", func() {
FIt("works", func() {
By("publishing and consuming a message", func() {
response := alivenessTest(hostname, port, username, password)
Expect(response.Status).To(Equal("ok"))
Expand Down Expand Up @@ -115,7 +115,8 @@ var _ = Describe("Operator", func() {
Eventually(func() bool {
Expect(rmqClusterClient.Get(ctx, types.NamespacedName{Name: cluster.Name, Namespace: cluster.Namespace}, fetchedRmq)).To(Succeed())
return fetchedRmq.Status.ObservedGeneration == fetchedRmq.Generation
}, 30).Should(BeTrue())
}, k8sQueryTimeout, 10).Should(BeTrue(), fmt.Sprintf("expected %d (Status.ObservedGeneration) = %d (Generation)",
fetchedRmq.Status.ObservedGeneration, fetchedRmq.Generation))
})

By("having all feature flags enabled", func() {
Expand Down Expand Up @@ -151,7 +152,7 @@ var _ = Describe("Operator", func() {
Expect(rmqClusterClient.Delete(context.TODO(), cluster)).To(Succeed())
})

FIt("keeps rabbitmq server related configurations up-to-date", func() {
It("keeps rabbitmq server related configurations up-to-date", func() {
By("updating enabled plugins and the secret ports when additionalPlugins are modified", func() {
// modify rabbitmqcluster.spec.rabbitmq.additionalPlugins
Expect(updateRabbitmqCluster(ctx, rmqClusterClient, cluster.Name, cluster.Namespace, func(cluster *rabbitmqv1beta1.RabbitmqCluster) {
Expand Down Expand Up @@ -329,7 +330,7 @@ CONSOLE_LOG=new`
waitForRabbitmqRunning(cluster)
})

It("allows volume expansion", func() {
FIt("allows volume expansion", func() {
podUID := pod(ctx, clientSet, cluster, 0).UID
output, err := kubectlExec(namespace, statefulSetPodName(cluster, 0), "rabbitmq", "df", "/var/lib/rabbitmq/mnesia")
Expect(err).ToNot(HaveOccurred())
Expand Down
3 changes: 2 additions & 1 deletion system_tests/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ import (
)

const podCreationTimeout = 10 * time.Minute
const portReadinessTimeout = 10 * time.Second
const portReadinessTimeout = 1 * time.Minute
const k8sQueryTimeout = 1 * time.Minute

type featureFlag struct {
Name string
Expand Down

0 comments on commit 49f10a3

Please sign in to comment.