From e9d8c59164fe4774ad40e5c200f0b876b33ef4bc Mon Sep 17 00:00:00 2001 From: wankai123 Date: Thu, 5 Jun 2025 10:13:52 +0800 Subject: [PATCH 1/2] Add e2e test case for oal disable --- test/e2e-v2/cases/mqe/docker-compose.yml | 1 + .../cases/mqe/expected/disable-metrics.yml | 19 +++++++++++++++ test/e2e-v2/cases/mqe/mqe-cases.yaml | 4 ++++ test/e2e-v2/cases/mqe/oal/disable.oal | 24 +++++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 test/e2e-v2/cases/mqe/expected/disable-metrics.yml create mode 100644 test/e2e-v2/cases/mqe/oal/disable.oal diff --git a/test/e2e-v2/cases/mqe/docker-compose.yml b/test/e2e-v2/cases/mqe/docker-compose.yml index 457fd337b763..d6924cbce8eb 100644 --- a/test/e2e-v2/cases/mqe/docker-compose.yml +++ b/test/e2e-v2/cases/mqe/docker-compose.yml @@ -22,6 +22,7 @@ services: service: oap volumes: - ./oal/core.oal:/skywalking/config/oal/core.oal + - ./oal/disable.oal:/skywalking/config/oal/disable.oal environment: SW_API_PIPELINE_BASELINE_SERVICE_HOST: baseline-server depends_on: diff --git a/test/e2e-v2/cases/mqe/expected/disable-metrics.yml b/test/e2e-v2/cases/mqe/expected/disable-metrics.yml new file mode 100644 index 000000000000..9a2843dccb41 --- /dev/null +++ b/test/e2e-v2/cases/mqe/expected/disable-metrics.yml @@ -0,0 +1,19 @@ +# 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. + +type: UNKNOWN +results: [] +error: 'Metric: [endpoint_cpm] does not exist.' +debuggingtrace: null diff --git a/test/e2e-v2/cases/mqe/mqe-cases.yaml b/test/e2e-v2/cases/mqe/mqe-cases.yaml index 506cf4ec2b8d..854b77254afa 100644 --- a/test/e2e-v2/cases/mqe/mqe-cases.yaml +++ b/test/e2e-v2/cases/mqe/mqe-cases.yaml @@ -118,3 +118,7 @@ cases: expected: expected/baseline-OP.yml - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="baseline(service_percentile{p='95,99'},upper)" --service-name=e2e-service-provider expected: expected/baseline-label-OP.yml + + # disable metrics + - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=endpoint_cpm --endpoint-name=POST:/users --service-name=e2e-service-provider + expected: expected/disable-metrics.yml diff --git a/test/e2e-v2/cases/mqe/oal/disable.oal b/test/e2e-v2/cases/mqe/oal/disable.oal new file mode 100644 index 000000000000..d2611e4f9494 --- /dev/null +++ b/test/e2e-v2/cases/mqe/oal/disable.oal @@ -0,0 +1,24 @@ +/* + * 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. + * + */ + +/////////////////////////////////////////////////////////////// +// +// Disable unnecessary hard core stream, targeting @Stream#name +// +/////////////////////////////////////////////////////////////// +disable(endpoint_cpm); \ No newline at end of file From 7dea238346bf3162594c94c7c7e41c9da55f312c Mon Sep 17 00:00:00 2001 From: wankai123 Date: Thu, 5 Jun 2025 11:10:14 +0800 Subject: [PATCH 2/2] increase kafka verify time --- test/e2e-v2/cases/kafka/kafka-monitoring/e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e-v2/cases/kafka/kafka-monitoring/e2e.yaml b/test/e2e-v2/cases/kafka/kafka-monitoring/e2e.yaml index 7b622598ad49..214bf8bb9e03 100644 --- a/test/e2e-v2/cases/kafka/kafka-monitoring/e2e.yaml +++ b/test/e2e-v2/cases/kafka/kafka-monitoring/e2e.yaml @@ -31,7 +31,7 @@ setup: verify: retry: count: 20 - interval: 3s + interval: 10s cases: - includes: - ./kafka-cases.yaml