Skip to content

Commit 825be3e

Browse files
authored
Merge pull request #775 from rabbitmq/mqtt-timeouts
Bump timeouts for mqtt connection system tests, remove k8s 1.19 and 1.20 tests from PR workflow
2 parents ce3bc0f + 3c7149b commit 825be3e

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.github/workflows/pr.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ jobs:
5252
strategy:
5353
matrix:
5454
k8s:
55-
- v1.19.11
56-
- v1.20.7
5755
- v1.21.1
5856
rabbitmq-image:
5957
- rabbitmq:3.8.8-management
@@ -79,6 +77,9 @@ jobs:
7977
kind create cluster --image kindest/node:"$K8S_VERSION"
8078
DOCKER_REGISTRY_SERVER=local-server OPERATOR_IMAGE=local-operator make deploy-kind
8179
SUPPORT_VOLUME_EXPANSION=false make system-tests
80+
- name: Setup tmate session
81+
if: ${{ failure() }} # start a debugging tmate session when system tests fail
82+
uses: mxschmitt/action-tmate@v3
8283

8384
kubectl_tests:
8485
name: kubectl rabbitmq tests

system_tests/system_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"os"
2020
"strconv"
2121
"strings"
22+
"time"
2223

2324
k8sresource "k8s.io/apimachinery/pkg/api/resource"
2425
"k8s.io/apimachinery/pkg/types"
@@ -165,7 +166,7 @@ var _ = Describe("Operator", func() {
165166
}
166167
Eventually(getConfigMapAnnotations, 30, 1).Should(
167168
HaveKey("rabbitmq.com/pluginsUpdatedAt"), "plugins ConfigMap should have been annotated")
168-
Eventually(getConfigMapAnnotations, 120, 1).Should(
169+
Eventually(getConfigMapAnnotations, 4 * time.Minute, 1).Should(
169170
Not(HaveKey("rabbitmq.com/pluginsUpdatedAt")), "plugins ConfigMap annotation should have been removed")
170171

171172
Eventually(func() map[string][]byte {

system_tests/utils.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ func publishAndConsumeMQTTMsg(hostname, port, username, password string, overWeb
846846
return true
847847
}
848848
return false
849-
}, 15, 2).Should(BeTrue(), "Expected to be able to connect to MQTT port")
849+
}, 30, 2).Should(BeTrue(), "Expected to be able to connect to MQTT port")
850850

851851
topic := "tests/mqtt"
852852
msgReceived := false
@@ -868,11 +868,11 @@ func publishAndConsumeMQTTMsg(hostname, port, username, password string, overWeb
868868

869869
EventuallyWithOffset(1, func() bool {
870870
return msgReceived
871-
}, 5*time.Second).Should(BeTrue(), "Expect to receive message")
871+
}, 10 * time.Second).Should(BeTrue(), "Expect to receive message")
872872

873873
token = c.Unsubscribe(topic)
874-
ExpectWithOffset(1, token.Wait()).To(BeTrue())
875-
ExpectWithOffset(1, token.Error()).ToNot(HaveOccurred())
874+
ExpectWithOffset(1, token.Wait()).To(BeTrue(), "Unsubscribe token should return true")
875+
ExpectWithOffset(1, token.Error()).ToNot(HaveOccurred(), "Unsubscribe token received error")
876876

877877
c.Disconnect(250)
878878
}

0 commit comments

Comments
 (0)