Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
21be702a
C
cat
项目概览
梦中观雨
/
cat
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
cat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
21be702a
编写于
11月 28, 2013
作者:
Y
yong.you
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unused testcase
上级
b17ff584
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
1 addition
and
48 deletion
+1
-48
cat-client/src/test/java/com/dianping/cat/AllTests.java
cat-client/src/test/java/com/dianping/cat/AllTests.java
+0
-2
cat-client/src/test/java/com/dianping/cat/configuration/ConfigTest.java
.../test/java/com/dianping/cat/configuration/ConfigTest.java
+0
-26
cat-home/src/test/java/com/dianping/cat/report/task/heavy/HeavyReportBuilderTest.java
...ianping/cat/report/task/heavy/HeavyReportBuilderTest.java
+1
-20
未找到文件。
cat-client/src/test/java/com/dianping/cat/AllTests.java
浏览文件 @
21be702a
...
@@ -56,8 +56,6 @@ ConfigTest.class,
...
@@ -56,8 +56,6 @@ ConfigTest.class,
/* .internal */
/* .internal */
MessageIdFactoryTest
.
class
,
MessageIdFactoryTest
.
class
,
MillisSecondTimerTest
.
class
,
MockMessageBuilderTest
.
class
,
MockMessageBuilderTest
.
class
,
/* .spi.codec */
/* .spi.codec */
...
...
cat-client/src/test/java/com/dianping/cat/configuration/ConfigTest.java
浏览文件 @
21be702a
...
@@ -4,19 +4,12 @@ import java.io.IOException;
...
@@ -4,19 +4,12 @@ import java.io.IOException;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.List
;
import
javax.xml.transform.stream.StreamSource
;
import
javax.xml.validation.Schema
;
import
javax.xml.validation.SchemaFactory
;
import
javax.xml.validation.Validator
;
import
junit.framework.Assert
;
import
junit.framework.Assert
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.unidal.helper.Files
;
import
org.unidal.helper.Files
;
import
org.xml.sax.SAXException
;
import
org.xml.sax.SAXException
;
import
com.dianping.cat.configuration.client.IEntity
;
import
com.dianping.cat.configuration.client.entity.ClientConfig
;
import
com.dianping.cat.configuration.client.entity.ClientConfig
;
import
com.dianping.cat.configuration.client.entity.Server
;
import
com.dianping.cat.configuration.client.entity.Server
;
import
com.dianping.cat.configuration.client.transform.DefaultSaxParser
;
import
com.dianping.cat.configuration.client.transform.DefaultSaxParser
;
...
@@ -64,23 +57,4 @@ public class ConfigTest {
...
@@ -64,23 +57,4 @@ public class ConfigTest {
Assert
.
assertEquals
(
"XML is not well parsed!"
,
expected
.
replace
(
"\r"
,
""
),
xml
.
replace
(
"\r"
,
""
));
Assert
.
assertEquals
(
"XML is not well parsed!"
,
expected
.
replace
(
"\r"
,
""
),
xml
.
replace
(
"\r"
,
""
));
}
}
@Test
@Ignore
public
void
testSchema
()
throws
Exception
{
// define the type of schema - we use W3C:
String
schemaLang
=
"http://www.w3.org/2001/XMLSchema"
;
// get validation driver:
SchemaFactory
factory
=
SchemaFactory
.
newInstance
(
schemaLang
);
// create schema by reading it from an XSD file:
String
path
=
"/"
+
IEntity
.
class
.
getPackage
().
getName
().
replace
(
'.'
,
'/'
);
Schema
schema
=
factory
.
newSchema
(
new
StreamSource
(
getClass
().
getResourceAsStream
(
path
+
"/config.xsd"
)));
Validator
validator
=
schema
.
newValidator
();
// at last perform validation:
validator
.
validate
(
new
StreamSource
(
getClass
().
getResourceAsStream
(
"client.xml"
)));
validator
.
validate
(
new
StreamSource
(
getClass
().
getResourceAsStream
(
"server.xml"
)));
validator
.
validate
(
new
StreamSource
(
getClass
().
getResourceAsStream
(
"config.xml"
)));
}
}
}
cat-home/src/test/java/com/dianping/cat/report/task/heavy/HeavyReportBuilderTest.java
浏览文件 @
21be702a
package
com.dianping.cat.report.task.heavy
;
package
com.dianping.cat.report.task.heavy
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.unidal.lookup.ComponentTestCase
;
import
org.unidal.helper.Files
;
import
org.unidal.helper.Files
;
import
org.unidal.lookup.ComponentTestCase
;
import
com.dianping.cat.Constants
;
import
com.dianping.cat.helper.TimeUtil
;
import
com.dianping.cat.home.heavy.entity.HeavyReport
;
import
com.dianping.cat.home.heavy.entity.HeavyReport
;
import
com.dianping.cat.home.heavy.transform.DefaultSaxParser
;
import
com.dianping.cat.home.heavy.transform.DefaultSaxParser
;
public
class
HeavyReportBuilderTest
extends
ComponentTestCase
{
public
class
HeavyReportBuilderTest
extends
ComponentTestCase
{
@Test
@Ignore
public
void
test
()
throws
Exception
{
HeavyReportBuilder
builder
=
lookup
(
HeavyReportBuilder
.
class
);
Date
date
=
new
SimpleDateFormat
(
"yyyyMMddHH"
).
parse
(
"2013082600"
);
for
(
int
i
=
0
;
i
<
24
;
i
++)
{
Date
current
=
new
Date
(
date
.
getTime
()
+
TimeUtil
.
ONE_HOUR
*
i
);
builder
.
buildHourlyTask
(
Constants
.
REPORT_HEAVY
,
Constants
.
CAT
,
current
);
}
builder
.
buildDailyTask
(
Constants
.
REPORT_HEAVY
,
Constants
.
CAT
,
date
);
}
@Test
@Test
public
void
testMerge
()
throws
Exception
{
public
void
testMerge
()
throws
Exception
{
String
oldXml
=
Files
.
forIO
().
readFrom
(
getClass
().
getResourceAsStream
(
"old.xml"
),
"utf-8"
);
String
oldXml
=
Files
.
forIO
().
readFrom
(
getClass
().
getResourceAsStream
(
"old.xml"
),
"utf-8"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录