diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6cf285933..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 @@ -79,6 +77,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 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 { diff --git a/system_tests/utils.go b/system_tests/utils.go index 7501f3f46..6bb87db30 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,11 +868,11 @@ 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()) - 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) }