Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
山不在高_有仙则灵
SkyWalking
提交
6737dfd4
S
SkyWalking
项目概览
山不在高_有仙则灵
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
12
Star
0
Fork
2
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
6737dfd4
编写于
10月 18, 2017
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove some test cases and stop schedule.
上级
6d19ba1b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
59 addition
and
35 deletion
+59
-35
apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/boot/ServiceManagerTest.java
...rg/skywalking/apm/agent/core/boot/ServiceManagerTest.java
+7
-0
apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/context/ContextManagerTest.java
...skywalking/apm/agent/core/context/ContextManagerTest.java
+9
-4
apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/context/IgnoredTracerContextTest.java
...king/apm/agent/core/context/IgnoredTracerContextTest.java
+7
-4
apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/remote/DiscoveryRestServiceClientTest.java
...apm/agent/core/remote/DiscoveryRestServiceClientTest.java
+27
-22
apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/remote/TraceSegmentServiceClientTest.java
.../apm/agent/core/remote/TraceSegmentServiceClientTest.java
+9
-5
未找到文件。
apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/boot/ServiceManagerTest.java
浏览文件 @
6737dfd4
...
...
@@ -21,6 +21,8 @@ package org.skywalking.apm.agent.core.boot;
import
java.lang.reflect.Field
;
import
java.util.HashMap
;
import
java.util.List
;
import
org.junit.AfterClass
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.skywalking.apm.agent.core.context.ContextManager
;
...
...
@@ -45,6 +47,11 @@ public class ServiceManagerTest {
@Rule
public
AgentServiceRule
agentServiceRule
=
new
AgentServiceRule
();
@AfterClass
public
static
void
afterClass
()
{
ServiceManager
.
INSTANCE
.
shutdown
();
}
@Test
public
void
testServiceDependencies
()
throws
Exception
{
HashMap
<
Class
,
BootService
>
registryService
=
getFieldValue
(
ServiceManager
.
INSTANCE
,
"bootedServices"
);
...
...
apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/context/ContextManagerTest.java
浏览文件 @
6737dfd4
...
...
@@ -20,11 +20,10 @@ package org.skywalking.apm.agent.core.context;
import
com.google.protobuf.InvalidProtocolBufferException
;
import
java.util.List
;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.*
;
import
org.junit.runner.RunWith
;
import
org.skywalking.apm.agent.core.boot.ServiceManager
;
import
org.skywalking.apm.agent.core.conf.RemoteDownstreamConfig
;
import
org.skywalking.apm.agent.core.context.tag.Tags
;
import
org.skywalking.apm.agent.core.context.trace.AbstractSpan
;
...
...
@@ -71,6 +70,12 @@ public class ContextManagerTest {
RemoteDownstreamConfig
.
Agent
.
APPLICATION_INSTANCE_ID
=
1
;
}
@AfterClass
public
static
void
afterClass
()
{
ServiceManager
.
INSTANCE
.
shutdown
();
}
@Test
public
void
createSpanWithInvalidateContextCarrier
()
{
ContextCarrier
contextCarrier
=
new
ContextCarrier
().
deserialize
(
"#AQA=#AQA=4WcWe0tQNQA=|1|#127.0.0.1:8080|#/testEntrySpan|#/testEntrySpan|#AQA=#AQA=Et0We0tQNQA="
);
...
...
apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/context/IgnoredTracerContextTest.java
浏览文件 @
6737dfd4
...
...
@@ -19,10 +19,8 @@
package
org.skywalking.apm.agent.core.context
;
import
java.util.LinkedList
;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.*
;
import
org.junit.runner.RunWith
;
import
org.skywalking.apm.agent.core.boot.ServiceManager
;
import
org.skywalking.apm.agent.core.conf.Config
;
...
...
@@ -53,6 +51,11 @@ public class IgnoredTracerContextTest {
RemoteDownstreamConfig
.
Agent
.
APPLICATION_INSTANCE_ID
=
1
;
}
@AfterClass
public
static
void
afterClass
()
{
ServiceManager
.
INSTANCE
.
shutdown
();
}
@After
public
void
tearDown
()
throws
Exception
{
}
...
...
apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/remote/DiscoveryRestServiceClientTest.java
浏览文件 @
6737dfd4
...
...
@@ -19,11 +19,11 @@
package
org.skywalking.apm.agent.core.remote
;
import
com.github.tomakehurst.wiremock.junit.WireMockRule
;
import
java.io.IOException
;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.*
;
import
org.skywalking.apm.agent.core.boot.ServiceManager
;
import
org.skywalking.apm.agent.core.conf.Config
;
import
org.skywalking.apm.agent.core.conf.RemoteDownstreamConfig
;
import
org.skywalking.apm.agent.core.test.tools.AgentServiceRule
;
...
...
@@ -44,32 +44,37 @@ public class DiscoveryRestServiceClientTest {
@Rule
public
WireMockRule
wireMockRule
=
new
WireMockRule
(
8089
);
@AfterClass
public
static
void
afterClass
()
{
ServiceManager
.
INSTANCE
.
shutdown
();
}
@Before
public
void
setUpBeforeClass
()
{
Config
.
Collector
.
DISCOVERY_CHECK_INTERVAL
=
1
;
stubFor
(
get
(
urlEqualTo
(
"/withoutResult"
))
.
willReturn
(
aResponse
()
.
withStatus
(
200
)
.
withHeader
(
"Content-Type"
,
"application/json"
)
.
withBody
(
"[]"
)));
.
willReturn
(
aResponse
()
.
withStatus
(
200
)
.
withHeader
(
"Content-Type"
,
"application/json"
)
.
withBody
(
"[]"
)));
stubFor
(
get
(
urlEqualTo
(
"/withResult"
))
.
willReturn
(
aResponse
()
.
withStatus
(
200
)
.
withHeader
(
"Content-Type"
,
"application/json"
)
.
withBody
(
"['127.0.0.1:8080','127.0.0.1:8090']"
)));
.
willReturn
(
aResponse
()
.
withStatus
(
200
)
.
withHeader
(
"Content-Type"
,
"application/json"
)
.
withBody
(
"['127.0.0.1:8080','127.0.0.1:8090']"
)));
stubFor
(
get
(
urlEqualTo
(
"/withSameResult"
))
.
willReturn
(
aResponse
()
.
withStatus
(
200
)
.
withHeader
(
"Content-Type"
,
"application/json"
)
.
withBody
(
"['127.0.0.1:8090','127.0.0.1:8080']"
)));
.
willReturn
(
aResponse
()
.
withStatus
(
200
)
.
withHeader
(
"Content-Type"
,
"application/json"
)
.
withBody
(
"['127.0.0.1:8090','127.0.0.1:8080']"
)));
stubFor
(
get
(
urlEqualTo
(
"/withDifferenceResult"
))
.
willReturn
(
aResponse
()
.
withStatus
(
200
)
.
withHeader
(
"Content-Type"
,
"application/json"
)
.
withBody
(
"['127.0.0.1:9090','127.0.0.1:18090']"
)));
.
willReturn
(
aResponse
()
.
withStatus
(
200
)
.
withHeader
(
"Content-Type"
,
"application/json"
)
.
withBody
(
"['127.0.0.1:9090','127.0.0.1:18090']"
)));
stubFor
(
get
(
urlEqualTo
(
"/with404"
))
.
willReturn
(
aResponse
()
.
withStatus
(
400
)));
.
willReturn
(
aResponse
()
.
withStatus
(
400
)));
}
@Test
...
...
apm-sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core/remote/TraceSegmentServiceClientTest.java
浏览文件 @
6737dfd4
...
...
@@ -21,12 +21,11 @@ package org.skywalking.apm.agent.core.remote;
import
com.google.protobuf.InvalidProtocolBufferException
;
import
io.grpc.stub.StreamObserver
;
import
io.grpc.testing.GrpcServerRule
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.junit.Before
;
import
org.junit.BeforeClass
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.*
;
import
org.junit.runner.RunWith
;
import
org.powermock.reflect.Whitebox
;
import
org.skywalking.apm.agent.core.boot.ServiceManager
;
...
...
@@ -94,13 +93,18 @@ public class TraceSegmentServiceClientTest {
RemoteDownstreamConfig
.
Agent
.
APPLICATION_INSTANCE_ID
=
1
;
}
@AfterClass
public
static
void
afterClass
()
{
ServiceManager
.
INSTANCE
.
shutdown
();
}
@Before
public
void
setUp
()
throws
Throwable
{
Whitebox
.
setInternalState
(
ServiceManager
.
INSTANCE
.
findService
(
GRPCChannelManager
.
class
),
"reconnect"
,
false
);
spy
(
serviceClient
);
Whitebox
.
setInternalState
(
serviceClient
,
"serviceStub"
,
TraceSegmentServiceGrpc
.
newStub
(
grpcServerRule
.
getChannel
()));
TraceSegmentServiceGrpc
.
newStub
(
grpcServerRule
.
getChannel
()));
Whitebox
.
setInternalState
(
serviceClient
,
"status"
,
GRPCChannelStatus
.
CONNECTED
);
upstreamSegments
=
new
ArrayList
<
UpstreamSegment
>();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录