Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
c9b28e4d
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 1 年多
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
c9b28e4d
编写于
10月 28, 2021
作者:
W
wankai123
提交者:
GitHub
10月 28, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace e2e cases to e2e-v2: TTL (#8028)
上级
50cc0445
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
911 addition
and
8 deletion
+911
-8
.github/workflows/e2e.ttl.yaml
.github/workflows/e2e.ttl.yaml
+13
-5
.gitmodules
.gitmodules
+3
-0
CHANGES.md
CHANGES.md
+1
-0
test/e2e-v2/cases/ttl/es/docker-compose.yml
test/e2e-v2/cases/ttl/es/docker-compose.yml
+71
-0
test/e2e-v2/cases/ttl/es/e2e.yaml
test/e2e-v2/cases/ttl/es/e2e.yaml
+37
-0
test/e2e-v2/cases/ttl/expected/metrics-has-no-value.yml
test/e2e-v2/cases/ttl/expected/metrics-has-no-value.yml
+19
-0
test/e2e-v2/cases/ttl/expected/metrics-has-value.yml
test/e2e-v2/cases/ttl/expected/metrics-has-value.yml
+19
-0
test/e2e-v2/cases/ttl/influxdb/docker-compose.yml
test/e2e-v2/cases/ttl/influxdb/docker-compose.yml
+66
-0
test/e2e-v2/cases/ttl/influxdb/e2e.yaml
test/e2e-v2/cases/ttl/influxdb/e2e.yaml
+37
-0
test/e2e-v2/cases/ttl/postgresql/docker-compose.yml
test/e2e-v2/cases/ttl/postgresql/docker-compose.yml
+70
-0
test/e2e-v2/cases/ttl/postgresql/e2e.yaml
test/e2e-v2/cases/ttl/postgresql/e2e.yaml
+37
-0
test/e2e-v2/cases/ttl/tidb/docker-compose.yml
test/e2e-v2/cases/ttl/tidb/docker-compose.yml
+72
-0
test/e2e-v2/cases/ttl/tidb/e2e.yaml
test/e2e-v2/cases/ttl/tidb/e2e.yaml
+37
-0
test/e2e-v2/cases/ttl/ttl-cases.yaml
test/e2e-v2/cases/ttl/ttl-cases.yaml
+29
-0
test/e2e-v2/java-test-service/e2e-mock-sender/pom.xml
test/e2e-v2/java-test-service/e2e-mock-sender/pom.xml
+64
-0
test/e2e-v2/java-test-service/e2e-mock-sender/src/main/java/org/apache/skywalking/e2e/E2EConfiguration.java
...main/java/org/apache/skywalking/e2e/E2EConfiguration.java
+31
-0
test/e2e-v2/java-test-service/e2e-mock-sender/src/main/java/org/apache/skywalking/e2e/ServiceApplication.java
...in/java/org/apache/skywalking/e2e/ServiceApplication.java
+32
-0
test/e2e-v2/java-test-service/e2e-mock-sender/src/main/java/org/apache/skywalking/e2e/controller/HealthController.java
...rg/apache/skywalking/e2e/controller/HealthController.java
+36
-0
test/e2e-v2/java-test-service/e2e-mock-sender/src/main/java/org/apache/skywalking/e2e/controller/ServiceMeshMetricSenderController.java
...ing/e2e/controller/ServiceMeshMetricSenderController.java
+108
-0
test/e2e-v2/java-test-service/e2e-mock-sender/src/main/resources/application.yml
...ervice/e2e-mock-sender/src/main/resources/application.yml
+25
-0
test/e2e-v2/java-test-service/e2e-protocol/pom.xml
test/e2e-v2/java-test-service/e2e-protocol/pom.xml
+98
-0
test/e2e-v2/java-test-service/e2e-protocol/src/main/proto
test/e2e-v2/java-test-service/e2e-protocol/src/main/proto
+1
-0
test/e2e-v2/java-test-service/pom.xml
test/e2e-v2/java-test-service/pom.xml
+2
-0
test/e2e-v2/script/env
test/e2e-v2/script/env
+1
-1
test/e2e/e2e-protocol/pom.xml
test/e2e/e2e-protocol/pom.xml
+1
-1
test/e2e/e2e-protocol/src/main/proto
test/e2e/e2e-protocol/src/main/proto
+1
-1
未找到文件。
.github/workflows/e2e.ttl.yaml
浏览文件 @
c9b28e4d
...
...
@@ -39,9 +39,15 @@ jobs:
timeout-minutes
:
90
strategy
:
matrix
:
storage
:
[
'
es6'
,
'
es7'
,
'
influxdb'
,
'
tidb'
,
'
postgresql'
]
env
:
SW_STORAGE
:
${{ matrix.storage }}
config-file
:
-
ttl/tidb/e2e.yaml
-
ttl/influxdb/e2e.yaml
-
ttl/postgresql/e2e.yaml
include
:
-
es-version
:
6.3.2
config-file
:
ttl/es/e2e.yaml
-
es-version
:
7.15.0
config-file
:
ttl/es/e2e.yaml
steps
:
-
uses
:
actions/checkout@v2
with
:
...
...
@@ -50,6 +56,8 @@ jobs:
uses
:
./.github/actions/skip
-
name
:
Run E2E Test
if
:
env.SKIP_CI != 'true'
uses
:
./.github/actions/e2e-test
uses
:
./.github/actions/infra-e2e-test
env
:
ES_VERSION
:
${{ matrix.es-version }}
with
:
test_class
:
org.apache.skywalking.e2e.ttl.StorageTTLE2E
config-file
:
${{ matrix.config-file }}
.gitmodules
浏览文件 @
c9b28e4d
...
...
@@ -10,3 +10,6 @@
[submodule "test/e2e/e2e-protocol/src/main/proto"]
path = test/e2e/e2e-protocol/src/main/proto
url = https://github.com/apache/skywalking-data-collect-protocol.git
[submodule "test/e2e-v2/java-test-service/e2e-protocol/src/main/proto"]
path = test/e2e-v2/java-test-service/e2e-protocol/src/main/proto
url = git@github.com:apache/skywalking-data-collect-protocol.git
CHANGES.md
浏览文件 @
c9b28e4d
...
...
@@ -26,6 +26,7 @@ Release Notes.
-
Kafka: Base, Meter, Log, Profile
-
Client-JS
-
Istio: ALS, Metrics
-
TTL
*
Support JDK 16 and 17.
#### OAP Server
...
...
test/e2e-v2/cases/ttl/es/docker-compose.yml
0 → 100644
浏览文件 @
c9b28e4d
# 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.
version
:
'
2.1'
services
:
es
:
image
:
elastic/elasticsearch:${ES_VERSION}
expose
:
-
9200
networks
:
-
e2e
environment
:
-
discovery.type=single-node
-
cluster.routing.allocation.disk.threshold_enabled=false
healthcheck
:
test
:
[
"
CMD"
,
"
bash"
,
"
-c"
,
"
cat
<
/dev/null
>
/dev/tcp/127.0.0.1/9200"
]
interval
:
5s
timeout
:
60s
retries
:
120
oap
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
oap
environment
:
SW_STORAGE
:
elasticsearch
SW_STORAGE_ES_BULK_ACTIONS
:
1
SW_CORE_DATA_KEEPER_EXECUTE_PERIOD
:
1
SW_STORAGE_ES_FLUSH_INTERVAL
:
1
SW_CORE_METRICS_DATA_TTL
:
7
depends_on
:
es
:
condition
:
service_healthy
ports
:
-
12800
sender
:
image
:
"
adoptopenjdk/openjdk8:alpine-jre"
volumes
:
-
./../../../java-test-service/e2e-mock-sender/target/e2e-mock-sender-2.0.0.jar:/e2e-mock-sender-2.0.0.jar
command
:
[
"
java"
,
"
-jar"
,
"
/e2e-mock-sender-2.0.0.jar"
]
environment
:
OAP_HOST
:
oap
OAP_GRPC_PORT
:
11800
networks
:
-
e2e
ports
:
-
9093
healthcheck
:
test
:
[
"
CMD"
,
"
sh"
,
"
-c"
,
"
nc
-nz
127.0.0.1
9093"
]
interval
:
5s
timeout
:
60s
retries
:
120
depends_on
:
oap
:
condition
:
service_healthy
networks
:
e2e
:
test/e2e-v2/cases/ttl/es/e2e.yaml
0 → 100644
浏览文件 @
c9b28e4d
# 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.
# 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
:
1200
init-system-environment
:
../../../script/env
steps
:
-
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
-
name
:
install etcdctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
verify
:
retry
:
count
:
30
interval
:
3s
cases
:
-
includes
:
-
../ttl-cases.yaml
test/e2e-v2/cases/ttl/expected/metrics-has-no-value.yml
0 → 100644
浏览文件 @
c9b28e4d
# 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.
{{
- range .
}}
-
key
:
{{
notEmpty .key
}}
value
:
0
{{
- end
}}
test/e2e-v2/cases/ttl/expected/metrics-has-value.yml
0 → 100644
浏览文件 @
c9b28e4d
# 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.
{{
- contains .
}}
-
key
:
{{
notEmpty .key
}}
value
:
{{
ge .value 1
}}
{{
- end
}}
test/e2e-v2/cases/ttl/influxdb/docker-compose.yml
0 → 100644
浏览文件 @
c9b28e4d
# 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.
version
:
'
2.1'
services
:
influxdb
:
image
:
influxdb:1.7.9
expose
:
-
8086
networks
:
-
e2e
healthcheck
:
test
:
[
"
CMD"
,
"
bash"
,
"
-c"
,
"
cat
<
/dev/null
>
/dev/tcp/127.0.0.1/8086"
]
interval
:
5s
timeout
:
60s
retries
:
120
oap
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
oap
environment
:
SW_STORAGE
:
influxdb
SW_CORE_DATA_KEEPER_EXECUTE_PERIOD
:
1
SW_CORE_METRICS_DATA_TTL
:
7
depends_on
:
influxdb
:
condition
:
service_healthy
ports
:
-
12800
sender
:
image
:
"
adoptopenjdk/openjdk8:alpine-jre"
volumes
:
-
./../../../java-test-service/e2e-mock-sender/target/e2e-mock-sender-2.0.0.jar:/e2e-mock-sender-2.0.0.jar
command
:
[
"
java"
,
"
-jar"
,
"
/e2e-mock-sender-2.0.0.jar"
]
environment
:
OAP_HOST
:
oap
OAP_GRPC_PORT
:
11800
networks
:
-
e2e
ports
:
-
9093
healthcheck
:
test
:
[
"
CMD"
,
"
sh"
,
"
-c"
,
"
nc
-nz
127.0.0.1
9093"
]
interval
:
5s
timeout
:
60s
retries
:
120
depends_on
:
oap
:
condition
:
service_healthy
networks
:
e2e
:
test/e2e-v2/cases/ttl/influxdb/e2e.yaml
0 → 100644
浏览文件 @
c9b28e4d
# 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.
# 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
:
1200
init-system-environment
:
../../../script/env
steps
:
-
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
-
name
:
install etcdctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
verify
:
retry
:
count
:
30
interval
:
3s
cases
:
-
includes
:
-
../ttl-cases.yaml
test/e2e-v2/cases/ttl/postgresql/docker-compose.yml
0 → 100644
浏览文件 @
c9b28e4d
# 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.
version
:
'
2.1'
services
:
postgres
:
image
:
postgres:13
networks
:
-
e2e
expose
:
-
5432
environment
:
-
POSTGRES_PASSWORD=123456
-
POSTGRES_DB=skywalking
healthcheck
:
test
:
[
"
CMD"
,
"
bash"
,
"
-c"
,
"
cat
<
/dev/null
>
/dev/tcp/127.0.0.1/5432"
]
interval
:
5s
timeout
:
60s
retries
:
120
oap
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
oap
environment
:
SW_STORAGE
:
postgresql
SW_CORE_DATA_KEEPER_EXECUTE_PERIOD
:
1
SW_CORE_METRICS_DATA_TTL
:
7
SW_JDBC_URL
:
"
jdbc:postgresql://postgres:5432/skywalking"
depends_on
:
postgres
:
condition
:
service_healthy
ports
:
-
12800
sender
:
image
:
"
adoptopenjdk/openjdk8:alpine-jre"
volumes
:
-
./../../../java-test-service/e2e-mock-sender/target/e2e-mock-sender-2.0.0.jar:/e2e-mock-sender-2.0.0.jar
command
:
[
"
java"
,
"
-jar"
,
"
/e2e-mock-sender-2.0.0.jar"
]
environment
:
OAP_HOST
:
oap
OAP_GRPC_PORT
:
11800
networks
:
-
e2e
ports
:
-
9093
healthcheck
:
test
:
[
"
CMD"
,
"
sh"
,
"
-c"
,
"
nc
-nz
127.0.0.1
9093"
]
interval
:
5s
timeout
:
60s
retries
:
120
depends_on
:
oap
:
condition
:
service_healthy
networks
:
e2e
:
test/e2e-v2/cases/ttl/postgresql/e2e.yaml
0 → 100644
浏览文件 @
c9b28e4d
# 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.
# 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
:
1200
init-system-environment
:
../../../script/env
steps
:
-
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
-
name
:
install etcdctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
verify
:
retry
:
count
:
30
interval
:
3s
cases
:
-
includes
:
-
../ttl-cases.yaml
test/e2e-v2/cases/ttl/tidb/docker-compose.yml
0 → 100644
浏览文件 @
c9b28e4d
# 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.
version
:
'
2.1'
services
:
tidb
:
image
:
pingcap/tidb:v4.0.12
expose
:
-
4000
volumes
:
-
./tidbconfig/tidb.toml:/tidb.toml:ro
restart
:
on-failure
healthcheck
:
test
:
[
"
CMD"
,
"
sh"
,
"
-c"
,
"
nc
-zn
127.0.0.1
4000"
]
interval
:
5s
timeout
:
60s
retries
:
120
networks
:
-
e2e
oap
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
oap
environment
:
SW_STORAGE
:
tidb
SW_CORE_DATA_KEEPER_EXECUTE_PERIOD
:
1
SW_CORE_METRICS_DATA_TTL
:
7
SW_JDBC_URL
:
"
jdbc:mysql://tidb:4000/test"
SW_DATA_SOURCE_PASSWORD
:
"
"
entrypoint
:
[
'
sh'
,
'
-c'
,
'
apk
add
--no-cache
bash
&&
/download-mysql.sh
&&
/skywalking/docker-entrypoint.sh'
]
depends_on
:
tidb
:
condition
:
service_healthy
ports
:
-
12800
sender
:
image
:
"
adoptopenjdk/openjdk8:alpine-jre"
volumes
:
-
./../../../java-test-service/e2e-mock-sender/target/e2e-mock-sender-2.0.0.jar:/e2e-mock-sender-2.0.0.jar
command
:
[
"
java"
,
"
-jar"
,
"
/e2e-mock-sender-2.0.0.jar"
]
environment
:
OAP_HOST
:
oap
OAP_GRPC_PORT
:
11800
networks
:
-
e2e
ports
:
-
9093
healthcheck
:
test
:
[
"
CMD"
,
"
sh"
,
"
-c"
,
"
nc
-nz
127.0.0.1
9093"
]
interval
:
5s
timeout
:
60s
retries
:
120
depends_on
:
oap
:
condition
:
service_healthy
networks
:
e2e
:
test/e2e-v2/cases/ttl/tidb/e2e.yaml
0 → 100644
浏览文件 @
c9b28e4d
# 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.
# 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
:
1200
init-system-environment
:
../../../script/env
steps
:
-
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
-
name
:
install etcdctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
verify
:
retry
:
count
:
30
interval
:
3s
cases
:
-
includes
:
-
../ttl-cases.yaml
test/e2e-v2/cases/ttl/ttl-cases.yaml
0 → 100644
浏览文件 @
c9b28e4d
# 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.
# This file is used to show how to write configuration files and can be used to test.
cases
:
# send metrics and ensure metrics exist, SW_CORE_METRICS_DATA_TTL=7
-
query
:
|
curl -s -XPOST http://${sender_host}:${sender_9093}/sendMetrics4TTL/7 > /dev/null;
sleep 10;
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_resp_time --service-name=e2e-test-dest-service --start="-193h" --end="-191h" |yq e 'to_entries' -
expected
:
expected/metrics-has-value.yml
# verify metrics has been deleted
-
query
:
|
sleep 30;
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_resp_time --service-id=ZTJlLXRlc3QtZGVzdC1zZXJ2aWNl.1 --start="-193h" --end="-191h" |yq e 'to_entries' -
expected
:
expected/metrics-has-no-value.yml
test/e2e-v2/java-test-service/e2e-mock-sender/pom.xml
0 → 100644
浏览文件 @
c9b28e4d
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
apache-skywalking-e2e
</artifactId>
<groupId>
org.apache.skywalking
</groupId>
<version>
2.0.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
jar
</packaging>
<artifactId>
e2e-mock-sender
</artifactId>
<dependencies>
<dependency>
<groupId>
org.apache.skywalking
</groupId>
<artifactId>
e2e-protocol
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
${spring.boot.version}
</version>
<configuration>
<executable>
true
</executable>
<addResources>
true
</addResources>
<excludeDevtools>
true
</excludeDevtools>
</configuration>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
test/e2e-v2/java-test-service/e2e-mock-sender/src/main/java/org/apache/skywalking/e2e/E2EConfiguration.java
0 → 100644
浏览文件 @
c9b28e4d
/*
* 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.
*
*/
package
org.apache.skywalking.e2e
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.Configuration
;
@Data
@Configuration
@ConfigurationProperties
(
"e2e"
)
public
class
E2EConfiguration
{
private
String
oapHost
;
private
String
oapGrpcPort
;
}
test/e2e-v2/java-test-service/e2e-mock-sender/src/main/java/org/apache/skywalking/e2e/ServiceApplication.java
0 → 100644
浏览文件 @
c9b28e4d
/*
* 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.
*
*/
package
org.apache.skywalking.e2e
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.ComponentScan
;
@SpringBootApplication
@ComponentScan
({
"org.apache.skywalking"
})
public
class
ServiceApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ServiceApplication
.
class
,
args
);
}
}
test/e2e-v2/java-test-service/e2e-mock-sender/src/main/java/org/apache/skywalking/e2e/controller/HealthController.java
0 → 100644
浏览文件 @
c9b28e4d
/*
* 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.
*
*/
package
org.apache.skywalking.e2e.controller
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.ResponseStatus
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequiredArgsConstructor
public
class
HealthController
{
@GetMapping
(
"/health"
)
@SuppressWarnings
(
"EmptyMethod"
)
@ResponseStatus
(
code
=
HttpStatus
.
OK
)
public
void
hello
()
{
}
}
test/e2e-v2/java-test-service/e2e-mock-sender/src/main/java/org/apache/skywalking/e2e/controller/ServiceMeshMetricSenderController.java
0 → 100644
浏览文件 @
c9b28e4d
/*
* 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.
*
*/
package
org.apache.skywalking.e2e.controller
;
import
io.grpc.ManagedChannel
;
import
io.grpc.internal.DnsNameResolverProvider
;
import
io.grpc.netty.NettyChannelBuilder
;
import
io.grpc.stub.StreamObserver
;
import
java.time.LocalDateTime
;
import
java.time.ZoneOffset
;
import
java.util.concurrent.CountDownLatch
;
import
org.apache.skywalking.apm.network.common.v3.DetectPoint
;
import
org.apache.skywalking.apm.network.servicemesh.v3.MeshProbeDownstream
;
import
org.apache.skywalking.apm.network.servicemesh.v3.Protocol
;
import
org.apache.skywalking.apm.network.servicemesh.v3.ServiceMeshMetric
;
import
org.apache.skywalking.apm.network.servicemesh.v3.ServiceMeshMetricServiceGrpc
;
import
org.apache.skywalking.e2e.E2EConfiguration
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
public
class
ServiceMeshMetricSenderController
{
private
static
final
int
MAX_INBOUND_MESSAGE_SIZE
=
1024
*
1024
*
50
;
private
static
final
boolean
SUCCESS
=
true
;
private
final
ServiceMeshMetricServiceGrpc
.
ServiceMeshMetricServiceStub
grpcStub
;
public
ServiceMeshMetricSenderController
(
final
E2EConfiguration
configuration
)
{
final
ManagedChannel
channel
=
NettyChannelBuilder
.
forAddress
(
configuration
.
getOapHost
(),
Integer
.
parseInt
(
configuration
.
getOapGrpcPort
()))
.
nameResolverFactory
(
new
DnsNameResolverProvider
())
.
maxInboundMessageSize
(
MAX_INBOUND_MESSAGE_SIZE
)
.
usePlaintext
()
.
build
();
grpcStub
=
ServiceMeshMetricServiceGrpc
.
newStub
(
channel
);
}
@PostMapping
(
"/sendMetrics4TTL/{metricsTTL}"
)
public
String
sendMetrics4TTL
(
@PathVariable
(
"metricsTTL"
)
int
metricsTTL
)
throws
Exception
{
final
ServiceMeshMetric
.
Builder
builder
=
ServiceMeshMetric
.
newBuilder
()
.
setSourceServiceName
(
"e2e-test-source-service"
)
.
setSourceServiceInstance
(
"e2e-test-source-service-instance"
)
.
setDestServiceName
(
"e2e-test-dest-service"
)
.
setDestServiceInstance
(
"e2e-test-dest-service-instance"
)
.
setEndpoint
(
"e2e/test"
)
.
setLatency
(
2000
)
.
setResponseCode
(
200
)
.
setStatus
(
SUCCESS
)
.
setProtocol
(
Protocol
.
HTTP
)
.
setDetectPoint
(
DetectPoint
.
server
);
final
LocalDateTime
now
=
LocalDateTime
.
now
(
ZoneOffset
.
UTC
);
final
LocalDateTime
startTime
=
now
.
minusDays
(
metricsTTL
+
1
);
final
LocalDateTime
endTime
=
startTime
.
plusMinutes
(
1
);
sendMetrics
(
builder
.
setStartTime
(
startTime
.
toEpochSecond
(
ZoneOffset
.
UTC
)
*
1000
)
.
setEndTime
(
endTime
.
toEpochSecond
(
ZoneOffset
.
UTC
)
*
1000
).
build
());
return
"Metrics send success!"
;
}
void
sendMetrics
(
final
ServiceMeshMetric
metrics
)
throws
InterruptedException
{
final
CountDownLatch
latch
=
new
CountDownLatch
(
1
);
StreamObserver
<
ServiceMeshMetric
>
collect
=
grpcStub
.
collect
(
new
StreamObserver
<
MeshProbeDownstream
>()
{
@Override
public
void
onNext
(
final
MeshProbeDownstream
meshProbeDownstream
)
{
}
@Override
public
void
onError
(
final
Throwable
throwable
)
{
throwable
.
printStackTrace
();
latch
.
countDown
();
}
@Override
public
void
onCompleted
()
{
latch
.
countDown
();
}
});
collect
.
onNext
(
metrics
);
collect
.
onCompleted
();
latch
.
await
();
}
}
test/e2e-v2/java-test-service/e2e-mock-sender/src/main/resources/application.yml
0 → 100644
浏览文件 @
c9b28e4d
# 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.
server
:
port
:
9093
spring
:
main
:
banner-mode
:
'
off'
e2e
:
oap-host
:
${OAP_HOST:127.0.0.1}
oap-grpc-port
:
${OAP_GRPC-PORT:11800}
test/e2e-v2/java-test-service/e2e-protocol/pom.xml
0 → 100644
浏览文件 @
c9b28e4d
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
~
-->
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
apache-skywalking-e2e
</artifactId>
<groupId>
org.apache.skywalking
</groupId>
<version>
2.0.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
e2e-protocol
</artifactId>
<properties>
<grpc.version>
1.14.0
</grpc.version>
<os-maven-plugin.version>
1.5.0.Final
</os-maven-plugin.version>
<protobuf-maven-plugin.version>
0.5.0
</protobuf-maven-plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>
io.grpc
</groupId>
<artifactId>
grpc-protobuf
</artifactId>
<version>
${grpc.version}
</version>
</dependency>
<dependency>
<groupId>
io.grpc
</groupId>
<artifactId>
grpc-stub
</artifactId>
<version>
${grpc.version}
</version>
</dependency>
<dependency>
<groupId>
io.grpc
</groupId>
<artifactId>
grpc-netty
</artifactId>
<version>
${grpc.version}
</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
kr.motd.maven
</groupId>
<artifactId>
os-maven-plugin
</artifactId>
<version>
${os-maven-plugin.version}
</version>
<executions>
<execution>
<phase>
initialize
</phase>
<goals>
<goal>
detect
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.xolstice.maven.plugins
</groupId>
<artifactId>
protobuf-maven-plugin
</artifactId>
<version>
${protobuf-maven-plugin.version}
</version>
<configuration>
<!--
The version of protoc must match protobuf-java. If you don't depend on
protobuf-java directly, you will be transitively depending on the
protobuf-java version that grpc depends on.
-->
<protocArtifact>
com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier}
</protocArtifact>
<pluginId>
grpc-java
</pluginId>
<pluginArtifact>
io.grpc:protoc-gen-grpc-java:1.8.0:exe:${os.detected.classifier}
</pluginArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>
compile
</goal>
<goal>
compile-custom
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
proto
@
21492e49
Subproject commit 21492e496b797567d0e127f4510509baf73e10fd
test/e2e-v2/java-test-service/pom.xml
浏览文件 @
c9b28e4d
...
...
@@ -30,6 +30,8 @@
<modules>
<module>
e2e-service-provider
</module>
<module>
e2e-service-consumer
</module>
<module>
e2e-mock-sender
</module>
<module>
e2e-protocol
</module>
</modules>
<properties>
...
...
test/e2e-v2/script/env
浏览文件 @
c9b28e4d
...
...
@@ -23,4 +23,4 @@ SW_AGENT_CLIENT_JS_COMMIT=af0565a67d382b683c1dbd94c379b7080db61449
SW_AGENT_CLIENT_JS_TEST_COMMIT=4f1eb1dcdbde3ec4a38534bf01dded4ab5d2f016
SW_KUBERNETES_COMMIT_SHA=0f3ec68e5a7e1608cec8688716b848ed15e971e5
SW_CTL_COMMIT=4
8338d3827bddd47f7db320a43978a29c1084e64
SW_CTL_COMMIT=4
5a5f9807126dc6ea9fe06e17e7aafbe212436d2
test/e2e/e2e-protocol/pom.xml
浏览文件 @
c9b28e4d
...
...
@@ -95,4 +95,4 @@
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
</project>
proto
@
21492e49
比较
e626ee04
...
21492e49
Subproject commit
e626ee04850703c220f64b642d2893fa65572943
Subproject commit
21492e496b797567d0e127f4510509baf73e10fd
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录