Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
1046944d
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,发现更多精彩内容 >>
提交
1046944d
编写于
9月 19, 2019
作者:
wu-sheng
提交者:
kezhenxu94
9月 19, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix variable name and log in e2e tests. (#3487)
上级
6942ec8f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
27 deletion
+29
-27
test/e2e/e2e-agent-reboot/src/test/java/org/apache/skywalking/e2e/AgentRebootITCase.java
...est/java/org/apache/skywalking/e2e/AgentRebootITCase.java
+14
-14
test/e2e/e2e-cluster/test-runner/src/test/java/org/apache/skywalking/e2e/ClusterVerificationITCase.java
.../org/apache/skywalking/e2e/ClusterVerificationITCase.java
+4
-4
test/e2e/e2e-single-service/src/test/java/org/apache/skywalking/e2e/SampleVerificationITCase.java
...a/org/apache/skywalking/e2e/SampleVerificationITCase.java
+11
-9
未找到文件。
test/e2e/e2e-agent-reboot/src/test/java/org/apache/skywalking/e2e/AgentRebootITCase.java
浏览文件 @
1046944d
...
...
@@ -235,8 +235,8 @@ public class AgentRebootITCase {
private
void
verifyInstancesMetrics
(
Instances
instances
)
throws
Exception
{
for
(
Instance
instance
:
instances
.
getInstances
())
{
for
(
String
metricsName
:
ALL_INSTANCE_METRICS
)
{
LOGGER
.
info
(
"verifying service instance
response time: {}"
,
instanc
e
);
final
Metrics
instance
RespTime
=
queryClient
.
metrics
(
LOGGER
.
info
(
"verifying service instance
{}, metrics {}"
,
instance
,
metricsNam
e
);
final
Metrics
instance
Metrics
=
queryClient
.
metrics
(
new
MetricsQuery
()
.
stepByMinute
()
.
metricsName
(
metricsName
)
...
...
@@ -246,8 +246,8 @@ public class AgentRebootITCase {
MetricsValueMatcher
greaterThanZero
=
new
MetricsValueMatcher
();
greaterThanZero
.
setValue
(
"gt 0"
);
instanceRespTimeMatcher
.
setValue
(
greaterThanZero
);
instanceRespTimeMatcher
.
verify
(
instance
RespTime
);
LOGGER
.
info
(
"{}: {}"
,
metricsName
,
instance
RespTime
);
instanceRespTimeMatcher
.
verify
(
instance
Metrics
);
LOGGER
.
info
(
"{}: {}"
,
metricsName
,
instance
Metrics
);
}
}
}
...
...
@@ -257,12 +257,12 @@ public class AgentRebootITCase {
if
(!
endpoint
.
getLabel
().
equals
(
"/e2e/users"
))
{
continue
;
}
for
(
String
metricName
:
ALL_ENDPOINT_METRICS
)
{
LOGGER
.
info
(
"verifying endpoint {}, metrics: {}"
,
endpoint
,
metricName
);
for
(
String
metric
s
Name
:
ALL_ENDPOINT_METRICS
)
{
LOGGER
.
info
(
"verifying endpoint {}, metrics: {}"
,
endpoint
,
metric
s
Name
);
final
Metrics
metrics
=
queryClient
.
metrics
(
new
MetricsQuery
()
.
stepByMinute
()
.
metricsName
(
metricName
)
.
metricsName
(
metric
s
Name
)
.
id
(
endpoint
.
getKey
())
);
AtLeastOneOfMetricsMatcher
instanceRespTimeMatcher
=
new
AtLeastOneOfMetricsMatcher
();
...
...
@@ -270,26 +270,26 @@ public class AgentRebootITCase {
greaterThanZero
.
setValue
(
"gt 0"
);
instanceRespTimeMatcher
.
setValue
(
greaterThanZero
);
instanceRespTimeMatcher
.
verify
(
metrics
);
LOGGER
.
info
(
"
metrics: {}"
,
metrics
);
LOGGER
.
info
(
"
{}: {}"
,
metricsName
,
metrics
);
}
}
}
private
void
verifyServiceMetrics
(
Service
service
)
throws
Exception
{
for
(
String
metricName
:
ALL_SERVICE_METRICS
)
{
LOGGER
.
info
(
"verifying service {}, metrics: {}"
,
service
,
metricName
);
final
Metrics
instanceRespTime
=
queryClient
.
metrics
(
for
(
String
metric
s
Name
:
ALL_SERVICE_METRICS
)
{
LOGGER
.
info
(
"verifying service {}, metrics: {}"
,
service
,
metric
s
Name
);
final
Metrics
serviceMetrics
=
queryClient
.
metrics
(
new
MetricsQuery
()
.
stepByMinute
()
.
metricsName
(
metricName
)
.
metricsName
(
metric
s
Name
)
.
id
(
service
.
getKey
())
);
AtLeastOneOfMetricsMatcher
instanceRespTimeMatcher
=
new
AtLeastOneOfMetricsMatcher
();
MetricsValueMatcher
greaterThanZero
=
new
MetricsValueMatcher
();
greaterThanZero
.
setValue
(
"gt 0"
);
instanceRespTimeMatcher
.
setValue
(
greaterThanZero
);
instanceRespTimeMatcher
.
verify
(
instanceRespTime
);
LOGGER
.
info
(
"
instanceRespTime: {}"
,
instanceRespTime
);
instanceRespTimeMatcher
.
verify
(
serviceMetrics
);
LOGGER
.
info
(
"
{}}: {}"
,
metricsName
,
serviceMetrics
);
}
}
...
...
test/e2e/e2e-cluster/test-runner/src/test/java/org/apache/skywalking/e2e/ClusterVerificationITCase.java
浏览文件 @
1046944d
...
...
@@ -227,8 +227,8 @@ public class ClusterVerificationITCase {
boolean
valid
=
false
;
while
(!
valid
)
{
LOGGER
.
warn
(
"instance
RespTime
is null, will retry to query"
);
Metrics
instance
RespTime
=
queryClient
.
metrics
(
LOGGER
.
warn
(
"instance
Metrics
is null, will retry to query"
);
Metrics
instance
Metrics
=
queryClient
.
metrics
(
new
MetricsQuery
()
.
stepByMinute
()
.
metricsName
(
metricsName
)
...
...
@@ -241,13 +241,13 @@ public class ClusterVerificationITCase {
greaterThanZero
.
setValue
(
"gt 0"
);
instanceRespTimeMatcher
.
setValue
(
greaterThanZero
);
try
{
instanceRespTimeMatcher
.
verify
(
instance
RespTime
);
instanceRespTimeMatcher
.
verify
(
instance
Metrics
);
valid
=
true
;
}
catch
(
Throwable
ignored
)
{
generateTraffic
();
Thread
.
sleep
(
retryInterval
);
}
LOGGER
.
info
(
"{}: {}"
,
metricsName
,
instance
RespTime
);
LOGGER
.
info
(
"{}: {}"
,
metricsName
,
instance
Metrics
);
}
}
}
...
...
test/e2e/e2e-single-service/src/test/java/org/apache/skywalking/e2e/SampleVerificationITCase.java
浏览文件 @
1046944d
...
...
@@ -188,7 +188,8 @@ public class SampleVerificationITCase {
}
}
private
Instances
verifyServiceInstances
(
LocalDateTime
minutesAgo
,
LocalDateTime
now
,
Service
service
)
throws
Exception
{
private
Instances
verifyServiceInstances
(
LocalDateTime
minutesAgo
,
LocalDateTime
now
,
Service
service
)
throws
Exception
{
InputStream
expectedInputStream
;
Instances
instances
=
queryClient
.
instances
(
new
InstancesQuery
()
...
...
@@ -203,7 +204,8 @@ public class SampleVerificationITCase {
return
instances
;
}
private
Endpoints
verifyServiceEndpoints
(
LocalDateTime
minutesAgo
,
LocalDateTime
now
,
Service
service
)
throws
Exception
{
private
Endpoints
verifyServiceEndpoints
(
LocalDateTime
minutesAgo
,
LocalDateTime
now
,
Service
service
)
throws
Exception
{
Endpoints
instances
=
queryClient
.
endpoints
(
new
EndpointQuery
().
serviceId
(
service
.
getKey
())
);
...
...
@@ -218,7 +220,7 @@ public class SampleVerificationITCase {
for
(
Instance
instance
:
instances
.
getInstances
())
{
for
(
String
metricsName
:
ALL_INSTANCE_METRICS
)
{
LOGGER
.
info
(
"verifying service instance response time: {}"
,
instance
);
final
Metrics
instance
RespTime
=
queryClient
.
metrics
(
final
Metrics
instance
Metrics
=
queryClient
.
metrics
(
new
MetricsQuery
()
.
stepByMinute
()
.
metricsName
(
metricsName
)
...
...
@@ -228,8 +230,8 @@ public class SampleVerificationITCase {
MetricsValueMatcher
greaterThanZero
=
new
MetricsValueMatcher
();
greaterThanZero
.
setValue
(
"gt 0"
);
instanceRespTimeMatcher
.
setValue
(
greaterThanZero
);
instanceRespTimeMatcher
.
verify
(
instance
RespTime
);
LOGGER
.
info
(
"{}: {}"
,
metricsName
,
instance
RespTime
);
instanceRespTimeMatcher
.
verify
(
instance
Metrics
);
LOGGER
.
info
(
"{}: {}"
,
metricsName
,
instance
Metrics
);
}
}
}
...
...
@@ -252,7 +254,7 @@ public class SampleVerificationITCase {
greaterThanZero
.
setValue
(
"gt 0"
);
instanceRespTimeMatcher
.
setValue
(
greaterThanZero
);
instanceRespTimeMatcher
.
verify
(
metrics
);
LOGGER
.
info
(
"
metrics: {}"
,
metrics
);
LOGGER
.
info
(
"
{}: {}"
,
metricName
,
metrics
);
}
}
}
...
...
@@ -260,7 +262,7 @@ public class SampleVerificationITCase {
private
void
verifyServiceMetrics
(
Service
service
)
throws
Exception
{
for
(
String
metricName
:
ALL_SERVICE_METRICS
)
{
LOGGER
.
info
(
"verifying service {}, metrics: {}"
,
service
,
metricName
);
final
Metrics
instanceRespTime
=
queryClient
.
metrics
(
final
Metrics
serviceMetrics
=
queryClient
.
metrics
(
new
MetricsQuery
()
.
stepByMinute
()
.
metricsName
(
metricName
)
...
...
@@ -270,8 +272,8 @@ public class SampleVerificationITCase {
MetricsValueMatcher
greaterThanZero
=
new
MetricsValueMatcher
();
greaterThanZero
.
setValue
(
"gt 0"
);
instanceRespTimeMatcher
.
setValue
(
greaterThanZero
);
instanceRespTimeMatcher
.
verify
(
instanceRespTime
);
LOGGER
.
info
(
"
instanceRespTime: {}"
,
instanceRespTime
);
instanceRespTimeMatcher
.
verify
(
serviceMetrics
);
LOGGER
.
info
(
"
{}: {}"
,
metricName
,
serviceMetrics
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录