Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump timeouts for mqtt connection system tests, remove k8s 1.19 and 1.20 tests from PR workflow #775

Merged
merged 5 commits into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ jobs:
strategy:
matrix:
k8s:
- v1.19.11
- v1.20.7
- v1.21.1
rabbitmq-image:
- rabbitmq:3.8.8-management
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion system_tests/system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"os"
"strconv"
"strings"
"time"

k8sresource "k8s.io/apimachinery/pkg/api/resource"
"k8s.io/apimachinery/pkg/types"
Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions system_tests/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
Expand Down