提交 21be702a 编写于 作者: Y yong.you

remove unused testcase

上级 b17ff584
......@@ -56,8 +56,6 @@ ConfigTest.class,
/* .internal */
MessageIdFactoryTest.class,
MillisSecondTimerTest.class,
MockMessageBuilderTest.class,
/* .spi.codec */
......
......@@ -4,19 +4,12 @@ import java.io.IOException;
import java.io.InputStream;
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 org.junit.Ignore;
import org.junit.Test;
import org.unidal.helper.Files;
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.Server;
import com.dianping.cat.configuration.client.transform.DefaultSaxParser;
......@@ -64,23 +57,4 @@ public class ConfigTest {
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")));
}
}
package com.dianping.cat.report.task.heavy;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.unidal.lookup.ComponentTestCase;
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.transform.DefaultSaxParser;
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
public void testMerge() throws Exception {
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.
先完成此消息的编辑!
想要评论请 注册