增加http监控支持

This commit is contained in:
温少
2012-05-11 20:24:17 +08:00
parent 90f434bca6
commit de80c9ab32
12 changed files with 267 additions and 9407 deletions
@@ -1,8 +1,35 @@
package com.alibaba.druid.http;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import junit.framework.TestCase;
import com.alibaba.druid.pool.DruidDataSource;
public class HttpServerTest2 extends TestCase {
private DruidDataSource dataSource;
protected void setUp() throws Exception {
dataSource = new DruidDataSource();
dataSource.setUrl("jdbc:mock:xx");
dataSource.setFilters("stat");
dataSource.init();
{
Connection conn = dataSource.getConnection();
PreparedStatement stmt = conn.prepareStatement("select 1");
ResultSet rs = stmt.executeQuery();
rs.close();
stmt.close();
conn.close();
}
}
public void tearDown() throws Exception {
dataSource.close();
}
public void test_httpServer() throws Exception {
HttpServer server = new HttpServer();