You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2022/10/20 04:38:47 UTC
[pulsar-helm-chart] branch master updated: [test] Add a consumer to the helm tests (#312)
This is an automated email from the ASF dual-hosted git repository.
mmarshall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git
The following commit(s) were added to refs/heads/master by this push:
new 2410743 [test] Add a consumer to the helm tests (#312)
2410743 is described below
commit 2410743cdbbf3ca29541cff9518844334cdc9f86
Author: Michael Marshall <mm...@apache.org>
AuthorDate: Wed Oct 19 21:38:42 2022 -0700
[test] Add a consumer to the helm tests (#312)
### Motivation
The current tests only produce a message. This test adds a consumer for the produced message.
### Modifications
* Add new section to the test where we consume the produced message
---
.ci/chart_test.sh | 4 ++--
.ci/helm.sh | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.ci/chart_test.sh b/.ci/chart_test.sh
index f58fc07..43bfa89 100755
--- a/.ci/chart_test.sh
+++ b/.ci/chart_test.sh
@@ -41,8 +41,8 @@ fi
# install pulsar chart
ci::install_pulsar_chart ${PULSAR_HOME}/${VALUES_FILE} ${extra_opts}
-# test producer
-ci::test_pulsar_producer
+# test producer/consumer
+ci::test_pulsar_producer_consumer
if [[ "x${FUNCTION}" == "xtrue" ]]; then
# install cert manager
diff --git a/.ci/helm.sh b/.ci/helm.sh
index 79fb8e7..ba964b7 100644
--- a/.ci/helm.sh
+++ b/.ci/helm.sh
@@ -163,7 +163,7 @@ function ci::install_pulsar_chart() {
# ${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bash -c 'until [ "$(curl -L http://pulsar-ci-proxy:8080/status.html)" == "OK" ]; do sleep 3; done'
}
-function ci::test_pulsar_producer() {
+function ci::test_pulsar_producer_consumer() {
sleep 120
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bash -c 'until nslookup pulsar-ci-broker; do sleep 3; done'
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bash -c 'until nslookup pulsar-ci-proxy; do sleep 3; done'
@@ -173,7 +173,10 @@ function ci::test_pulsar_producer() {
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/bookkeeper shell listbookies -ro
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-admin tenants create pulsar-ci
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-admin namespaces create pulsar-ci/test
+ ${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-admin topics create pulsar-ci/test/test-topic
+ ${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-admin topics create-subscription -s test pulsar-ci/test/test-topic
${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-client produce -m "test-message" pulsar-ci/test/test-topic
+ ${KUBECTL} exec -n ${NAMESPACE} ${CLUSTER}-toolset-0 -- bin/pulsar-client consume -s test pulsar-ci/test/test-topic
}
function ci::wait_function_running() {