Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
山不在高_有仙则灵
SkyWalking
提交
8d5fbcf1
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,发现更多精彩内容 >>
提交
8d5fbcf1
编写于
2月 25, 2018
作者:
C
carlvine
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update rocketMQ-3.x-plugin junit tests like rocketMQ-4.x-plugin
上级
bcec5c87
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
32 addition
and
30 deletion
+32
-30
apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/MessageSendInterceptorTest.java
...ng/apm/plugin/rocketMQ/v3/MessageSendInterceptorTest.java
+13
-14
apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/OnExceptionInterceptorTest.java
...ng/apm/plugin/rocketMQ/v3/OnExceptionInterceptorTest.java
+9
-8
apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/OnSuccessInterceptorTest.java
...king/apm/plugin/rocketMQ/v3/OnSuccessInterceptorTest.java
+10
-8
未找到文件。
apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/MessageSendInterceptorTest.java
浏览文件 @
8d5fbcf1
...
...
@@ -16,31 +16,32 @@
*
*/
package
org.apache.skywalking.apm.plugin.rocketMQ.v3
;
import
java.util.List
;
import
com.alibaba.rocketmq.client.impl.CommunicationMode
;
import
com.alibaba.rocketmq.common.message.Message
;
import
com.alibaba.rocketmq.common.protocol.header.SendMessageRequestHeader
;
import
java.util.List
;
import
org.apache.skywalking.apm.agent.test.tools.SegmentStorage
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.mockito.Matchers
;
import
org.mockito.Mock
;
import
org.powermock.modules.junit4.PowerMockRunner
;
import
org.powermock.modules.junit4.PowerMockRunnerDelegate
;
import
org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan
;
import
org.apache.skywalking.apm.agent.core.context.trace.SpanLayer
;
import
org.apache.skywalking.apm.agent.core.context.trace.TraceSegment
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance
;
import
org.apache.skywalking.apm.agent.test.helper.SegmentHelper
;
import
org.apache.skywalking.apm.agent.test.tools.AgentServiceRule
;
import
org.apache.skywalking.apm.agent.test.tools.SegmentStorage
;
import
org.apache.skywalking.apm.agent.test.tools.SegmentStoragePoint
;
import
org.apache.skywalking.apm.agent.test.tools.SpanAssert
;
import
org.apache.skywalking.apm.agent.test.tools.TracingSegmentRunner
;
import
org.apache.skywalking.apm.network.trace.component.ComponentsDefine
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.mockito.Matchers
;
import
org.mockito.Mock
;
import
org.powermock.modules.junit4.PowerMockRunner
;
import
org.powermock.modules.junit4.PowerMockRunnerDelegate
;
import
static
org
.
hamcrest
.
CoreMatchers
.
is
;
import
static
org
.
junit
.
Assert
.
assertThat
;
...
...
@@ -109,8 +110,7 @@ public class MessageSendInterceptorTest {
SpanAssert
.
assertLayer
(
mqSpan
,
SpanLayer
.
MQ
);
SpanAssert
.
assertComponent
(
mqSpan
,
ComponentsDefine
.
ROCKET_MQ
);
SpanAssert
.
assertTag
(
mqSpan
,
0
,
"test"
);
SpanAssert
.
assertTag
(
mqSpan
,
1
,
"TagA"
);
SpanAssert
.
assertTag
(
mqSpan
,
0
,
"127.0.0.1"
);
verify
(
messageRequestHeader
,
times
(
1
)).
setProperties
(
anyString
());
verify
(
callBack
,
times
(
1
)).
setSkyWalkingDynamicField
(
Matchers
.
any
());
}
...
...
@@ -129,8 +129,7 @@ public class MessageSendInterceptorTest {
SpanAssert
.
assertLayer
(
mqSpan
,
SpanLayer
.
MQ
);
SpanAssert
.
assertComponent
(
mqSpan
,
ComponentsDefine
.
ROCKET_MQ
);
SpanAssert
.
assertTag
(
mqSpan
,
0
,
"test"
);
SpanAssert
.
assertTag
(
mqSpan
,
1
,
"TagA"
);
SpanAssert
.
assertTag
(
mqSpan
,
0
,
"127.0.0.1"
);
verify
(
messageRequestHeader
,
times
(
1
)).
setProperties
(
anyString
());
}
...
...
apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/OnExceptionInterceptorTest.java
浏览文件 @
8d5fbcf1
...
...
@@ -16,17 +16,10 @@
*
*/
package
org.apache.skywalking.apm.plugin.rocketMQ.v3
;
import
java.util.List
;
import
org.apache.skywalking.apm.plugin.rocketMQ.v3.define.SendCallBackEnhanceInfo
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.mockito.Mock
;
import
org.powermock.modules.junit4.PowerMockRunner
;
import
org.powermock.modules.junit4.PowerMockRunnerDelegate
;
import
org.apache.skywalking.apm.agent.core.context.ContextSnapshot
;
import
org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan
;
import
org.apache.skywalking.apm.agent.core.context.trace.TraceSegment
;
...
...
@@ -38,6 +31,14 @@ import org.apache.skywalking.apm.agent.test.tools.SegmentStorage;
import
org.apache.skywalking.apm.agent.test.tools.SegmentStoragePoint
;
import
org.apache.skywalking.apm.agent.test.tools.SpanAssert
;
import
org.apache.skywalking.apm.agent.test.tools.TracingSegmentRunner
;
import
org.apache.skywalking.apm.plugin.rocketMQ.v3.define.SendCallBackEnhanceInfo
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.mockito.Mock
;
import
org.powermock.modules.junit4.PowerMockRunner
;
import
org.powermock.modules.junit4.PowerMockRunnerDelegate
;
import
static
org
.
hamcrest
.
CoreMatchers
.
is
;
import
static
org
.
junit
.
Assert
.
assertThat
;
...
...
apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/OnSuccessInterceptorTest.java
浏览文件 @
8d5fbcf1
...
...
@@ -15,19 +15,13 @@
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.plugin.rocketMQ.v3
;
import
java.util.List
;
import
com.alibaba.rocketmq.client.producer.SendResult
;
import
com.alibaba.rocketmq.client.producer.SendStatus
;
import
org.apache.skywalking.apm.plugin.rocketMQ.v3.define.SendCallBackEnhanceInfo
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.mockito.Mock
;
import
org.powermock.modules.junit4.PowerMockRunner
;
import
org.powermock.modules.junit4.PowerMockRunnerDelegate
;
import
org.apache.skywalking.apm.agent.core.context.ContextSnapshot
;
import
org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan
;
import
org.apache.skywalking.apm.agent.core.context.trace.TraceSegment
;
...
...
@@ -39,6 +33,14 @@ import org.apache.skywalking.apm.agent.test.tools.SegmentStoragePoint;
import
org.apache.skywalking.apm.agent.test.tools.SpanAssert
;
import
org.apache.skywalking.apm.agent.test.tools.TracingSegmentRunner
;
import
org.apache.skywalking.apm.network.trace.component.ComponentsDefine
;
import
org.apache.skywalking.apm.plugin.rocketMQ.v3.define.SendCallBackEnhanceInfo
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.mockito.Mock
;
import
org.powermock.modules.junit4.PowerMockRunner
;
import
org.powermock.modules.junit4.PowerMockRunnerDelegate
;
import
static
org
.
hamcrest
.
CoreMatchers
.
is
;
import
static
org
.
junit
.
Assert
.
assertThat
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录