This is an automated email from the ASF dual-hosted git repository.

wankai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new d331eb1bee Add e2e test case for oal disable (#13295)
d331eb1bee is described below

commit d331eb1beef1f2c246bdfb360a28399d6e5336e7
Author: Wan Kai <[email protected]>
AuthorDate: Thu Jun 5 11:47:39 2025 +0800

    Add e2e test case for oal disable (#13295)
---
 test/e2e-v2/cases/kafka/kafka-monitoring/e2e.yaml  |  2 +-
 test/e2e-v2/cases/mqe/docker-compose.yml           |  1 +
 .../e2e.yaml => mqe/expected/disable-metrics.yml}  | 26 ++++------------------
 test/e2e-v2/cases/mqe/mqe-cases.yaml               |  4 ++++
 test/e2e-v2/cases/mqe/oal/disable.oal              | 24 ++++++++++++++++++++
 5 files changed, 34 insertions(+), 23 deletions(-)

diff --git a/test/e2e-v2/cases/kafka/kafka-monitoring/e2e.yaml 
b/test/e2e-v2/cases/kafka/kafka-monitoring/e2e.yaml
index 7b622598ad..214bf8bb9e 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
diff --git a/test/e2e-v2/cases/mqe/docker-compose.yml 
b/test/e2e-v2/cases/mqe/docker-compose.yml
index 457fd337b7..d6924cbce8 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/kafka/kafka-monitoring/e2e.yaml 
b/test/e2e-v2/cases/mqe/expected/disable-metrics.yml
similarity index 56%
copy from test/e2e-v2/cases/kafka/kafka-monitoring/e2e.yaml
copy to test/e2e-v2/cases/mqe/expected/disable-metrics.yml
index 7b622598ad..9a2843dccb 100644
--- a/test/e2e-v2/cases/kafka/kafka-monitoring/e2e.yaml
+++ b/test/e2e-v2/cases/mqe/expected/disable-metrics.yml
@@ -13,25 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# This file is used to show how to write configuration files and can be used 
to test.
-
-setup:
-  env: compose
-  file: docker-compose.yml
-  timeout: 20m
-  init-system-environment: ../../../script/env
-  steps:
-    - name: set PATH
-      command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH
-    - name: install yq
-      command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
-    - name: install swctl
-      command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
-
-verify:
-  retry:
-    count: 20
-    interval: 3s
-  cases:
-    - includes:
-        - ./kafka-cases.yaml
+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 506cf4ec2b..854b77254a 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 0000000000..d2611e4f94
--- /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

Reply via email to