Skip to content

Commit

Permalink
Merge pull request #768 from rabbitmq/flaky-tests
Browse files Browse the repository at this point in the history
Bump system tests timeouts and remove k8s 1.18 from PR workflow
  • Loading branch information
ChunyiLyu authored Jul 19, 2021
2 parents dfe2111 + b68c8e4 commit fdfd9a4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
strategy:
matrix:
k8s:
- v1.18.19
- v1.19.11
- v1.20.7
- v1.21.1
Expand Down
4 changes: 2 additions & 2 deletions system_tests/system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,14 @@ var _ = Describe("Operator", func() {
}
Eventually(getConfigMapAnnotations, 30, 1).Should(
HaveKey("rabbitmq.com/pluginsUpdatedAt"), "plugins ConfigMap should have been annotated")
Eventually(getConfigMapAnnotations, 60, 1).Should(
Eventually(getConfigMapAnnotations, 120, 1).Should(
Not(HaveKey("rabbitmq.com/pluginsUpdatedAt")), "plugins ConfigMap annotation should have been removed")

Eventually(func() map[string][]byte {
secret, err := clientSet.CoreV1().Secrets(cluster.Namespace).Get(ctx, cluster.ChildResourceName("default-user"), metav1.GetOptions{})
Expect(err).NotTo(HaveOccurred())
return secret.Data
}).Should(HaveKeyWithValue("mqtt-port", []byte("1883")))
}, 30).Should(HaveKeyWithValue("mqtt-port", []byte("1883")))

_, err := kubectlExec(namespace,
statefulSetPodName(cluster, 0),
Expand Down
10 changes: 5 additions & 5 deletions system_tests/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -859,16 +859,16 @@ func publishAndConsumeMQTTMsg(hostname, port, username, password string, overWeb
}

token = c.Subscribe(topic, 0, handler)
ExpectWithOffset(1, token.Wait()).To(BeTrue())
ExpectWithOffset(1, token.Error()).ToNot(HaveOccurred())
ExpectWithOffset(1, token.Wait()).To(BeTrue(), "Subscribe token should return true")
ExpectWithOffset(1, token.Error()).ToNot(HaveOccurred(), "Subscribe token received error")

token = c.Publish(topic, 0, false, "test message MQTT")
ExpectWithOffset(1, token.Wait()).To(BeTrue())
ExpectWithOffset(1, token.Error()).ToNot(HaveOccurred())
ExpectWithOffset(1, token.Wait()).To(BeTrue(), "Publish token should return true")
ExpectWithOffset(1, token.Error()).ToNot(HaveOccurred(), "Publish token received error")

EventuallyWithOffset(1, func() bool {
return msgReceived
}, 5*time.Second).Should(BeTrue())
}, 5*time.Second).Should(BeTrue(), "Expect to receive message")

token = c.Unsubscribe(topic)
ExpectWithOffset(1, token.Wait()).To(BeTrue())
Expand Down

0 comments on commit fdfd9a4

Please sign in to comment.