moremind commented on code in PR #5428:
URL: https://github.com/apache/shenyu/pull/5428#discussion_r1475571853
##########
shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-http/k8s/script/e2e-http-sync.sh:
##########
@@ -69,6 +72,7 @@ for sync in ${SYNC_ARRAY[@]}; do
kubectl delete -f
"${SHENYU_TESTCASE_DIR}"/k8s/sync/shenyu-admin-"${sync}".yml
kubectl delete -f
"${SHENYU_TESTCASE_DIR}"/k8s/sync/shenyu-bootstrap-"${sync}".yml
kubectl delete -f "${PRGDIR}"/shenyu-examples-http.yml
+ kubectl delete -f "${PRGDIR}"/rocket-mq.yml
Review Comment:
why remove this?
##########
shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-http/k8s/rocket-mq.yml:
##########
@@ -0,0 +1,85 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: rocketmq
+spec:
+ selector:
+ matchLabels:
+ app: rocketmq
+ serviceName: rocketmq-headless
+ replicas: 3
Review Comment:
pls use 1
##########
shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-http/k8s/script/e2e-http-sync.sh:
##########
@@ -49,9 +49,12 @@ for sync in ${SYNC_ARRAY[@]}; do
sh "$SHENYU_TESTCASE_DIR"/k8s/script/healthcheck.sh
http://localhost:31195/actuator/health
kubectl apply -f "${PRGDIR}"/shenyu-examples-http.yml
sh "$SHENYU_TESTCASE_DIR"/k8s/script/healthcheck.sh
http://localhost:31189/actuator/health
+ kubectl apply -f "${PRGDIR}"/rocket-mq.yml
Review Comment:
the order is error
##########
shenyu-e2e/shenyu-e2e-case/shenyu-e2e-case-http/src/test/java/org/apache/shenyu/e2e/testcase/http/DividePluginCases.java:
##########
@@ -46,4 +73,68 @@ private ShenYuScenarioSpec testDivideHello() {
.build())
.build();
}
+
+ private ShenYuScenarioSpec testRocketMQHello() {
+ return ShenYuScenarioSpec.builder()
+ .name("testRocketMQHello")
+ .beforeEachSpec(
+ ShenYuBeforeEachSpec.builder()
+ .addSelectorAndRule(
+ newSelectorBuilder("selector",
Plugin.LOGGING_ROCKETMQ)
+ .name("1")
+ .matchMode(MatchMode.OR)
+
.conditionList(newConditions(Condition.ParamType.URI,
Condition.Operator.STARTS_WITH, "/http"))
+ .build(),
+ newRuleBuilder("rule")
+ .name("1")
+ .matchMode(MatchMode.OR)
+
.conditionList(newConditions(Condition.ParamType.URI,
Condition.Operator.STARTS_WITH, "/http"))
+ .build()
+ )
+ .checker(exists(TEST))
+ .build()
+ )
+ .caseSpec(
+ ShenYuCaseSpec.builder()
+ .add(request -> {
+ try {
+ request.request(Method.GET,
"/http/order/findById?id=22");
+ DefaultMQPushConsumer consumer = new
DefaultMQPushConsumer(consumerGroup);
+ // 设置NameServer地址
+ consumer.setNamesrvAddr(nameServer);
+ //
订阅一个或多个topic,并指定tag过滤条件,这里指定*表示接收所有tag的消息
+ consumer.subscribe(topic, "*");
+ //设置采用广播模式,广播模式下,消费组内的每一个消费者都会消费全量消息。
Review Comment:
pls use english
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]