From 0684c121e3ba6db01a101066c115e3d2623fb0f5 Mon Sep 17 00:00:00 2001 From: Chunyi Lyu Date: Mon, 19 Jul 2021 16:31:20 +0100 Subject: [PATCH 1/5] Bump timeouts for mqtt connection system tests --- system_tests/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system_tests/utils.go b/system_tests/utils.go index 7501f3f46..a2686c773 100644 --- a/system_tests/utils.go +++ b/system_tests/utils.go @@ -846,7 +846,7 @@ func publishAndConsumeMQTTMsg(hostname, port, username, password string, overWeb return true } return false - }, 15, 2).Should(BeTrue(), "Expected to be able to connect to MQTT port") + }, 30, 2).Should(BeTrue(), "Expected to be able to connect to MQTT port") topic := "tests/mqtt" msgReceived := false @@ -868,7 +868,7 @@ func publishAndConsumeMQTTMsg(hostname, port, username, password string, overWeb EventuallyWithOffset(1, func() bool { return msgReceived - }, 5*time.Second).Should(BeTrue(), "Expect to receive message") + }, 10 * time.Second).Should(BeTrue(), "Expect to receive message") token = c.Unsubscribe(topic) ExpectWithOffset(1, token.Wait()).To(BeTrue()) From 0bd27b7103a6ab2c575535b26419fe2f0314ed55 Mon Sep 17 00:00:00 2001 From: Chunyi Lyu Date: Mon, 19 Jul 2021 16:52:41 +0100 Subject: [PATCH 2/5] Add more assertion descriptions to mqtt system tests --- system_tests/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system_tests/utils.go b/system_tests/utils.go index a2686c773..6bb87db30 100644 --- a/system_tests/utils.go +++ b/system_tests/utils.go @@ -871,8 +871,8 @@ func publishAndConsumeMQTTMsg(hostname, port, username, password string, overWeb }, 10 * time.Second).Should(BeTrue(), "Expect to receive message") token = c.Unsubscribe(topic) - ExpectWithOffset(1, token.Wait()).To(BeTrue()) - ExpectWithOffset(1, token.Error()).ToNot(HaveOccurred()) + ExpectWithOffset(1, token.Wait()).To(BeTrue(), "Unsubscribe token should return true") + ExpectWithOffset(1, token.Error()).ToNot(HaveOccurred(), "Unsubscribe token received error") c.Disconnect(250) } From 0fe4d09bd35a72dca81f44b5427ba5dce65b43fb Mon Sep 17 00:00:00 2001 From: Chunyi Lyu Date: Tue, 20 Jul 2021 15:29:58 +0100 Subject: [PATCH 3/5] Increate configuration updates timeout --- system_tests/system_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system_tests/system_test.go b/system_tests/system_test.go index ae1082e10..f619a34bb 100644 --- a/system_tests/system_test.go +++ b/system_tests/system_test.go @@ -19,6 +19,7 @@ import ( "os" "strconv" "strings" + "time" k8sresource "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/types" @@ -165,7 +166,7 @@ var _ = Describe("Operator", func() { } Eventually(getConfigMapAnnotations, 30, 1).Should( HaveKey("rabbitmq.com/pluginsUpdatedAt"), "plugins ConfigMap should have been annotated") - Eventually(getConfigMapAnnotations, 120, 1).Should( + Eventually(getConfigMapAnnotations, 4 * time.Minute, 1).Should( Not(HaveKey("rabbitmq.com/pluginsUpdatedAt")), "plugins ConfigMap annotation should have been removed") Eventually(func() map[string][]byte { From a395c1481d09866ff88fbf3ea4fb4e930ac48dd4 Mon Sep 17 00:00:00 2001 From: Chunyi Lyu Date: Wed, 21 Jul 2021 09:45:24 +0100 Subject: [PATCH 4/5] Enable tmate debug session for PR workflow --- .github/workflows/pr.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6cf285933..a9949cd5e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -79,6 +79,9 @@ jobs: kind create cluster --image kindest/node:"$K8S_VERSION" DOCKER_REGISTRY_SERVER=local-server OPERATOR_IMAGE=local-operator make deploy-kind SUPPORT_VOLUME_EXPANSION=false make system-tests + - name: Setup tmate session + if: ${{ failure() }} # start a debugging tmate session when system tests fail + uses: mxschmitt/action-tmate@v3 kubectl_tests: name: kubectl rabbitmq tests From 3c7149b256ea24e4e2250024db0c9ecc7a107f2d Mon Sep 17 00:00:00 2001 From: Chunyi Lyu Date: Wed, 21 Jul 2021 10:43:43 +0100 Subject: [PATCH 5/5] k8s 1.19&1.20 sys tests will be moved to CI pipeline only --- .github/workflows/pr.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a9949cd5e..c77237be5 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -52,8 +52,6 @@ jobs: strategy: matrix: k8s: - - v1.19.11 - - v1.20.7 - v1.21.1 rabbitmq-image: - rabbitmq:3.8.8-management