use of com.navercorp.pinpoint.bootstrap.context.DatabaseInfo in project pinpoint by naver.
the class MySqlUrlParserTest method mysqlParse3.
@Test
public void mysqlParse3() {
DatabaseInfo dbInfo = jdbcUrlParser.parse("jdbc:mysql://61.74.71.31/log?useUnicode=yes&characterEncoding=UTF-8");
Assert.assertTrue(dbInfo.isParsingComplete());
Assert.assertEquals(dbInfo.getType(), MySqlConstants.MYSQL);
Assert.assertEquals(dbInfo.getHost().get(0), "61.74.71.31");
Assert.assertEquals(dbInfo.getDatabaseId(), "log");
Assert.assertEquals(dbInfo.getUrl(), "jdbc:mysql://61.74.71.31/log");
logger.info(dbInfo.toString());
}
use of com.navercorp.pinpoint.bootstrap.context.DatabaseInfo in project pinpoint by naver.
the class MySqlUrlParserTest method mysqlParse2.
@Test
public void mysqlParse2() {
DatabaseInfo dbInfo = jdbcUrlParser.parse("jdbc:mysql://10.98.133.22:3306/test_lucy_db");
Assert.assertTrue(dbInfo.isParsingComplete());
Assert.assertEquals(dbInfo.getType(), MySqlConstants.MYSQL);
Assert.assertEquals(dbInfo.getHost().get(0), "10.98.133.22:3306");
Assert.assertEquals(dbInfo.getDatabaseId(), "test_lucy_db");
Assert.assertEquals(dbInfo.getUrl(), "jdbc:mysql://10.98.133.22:3306/test_lucy_db");
logger.info(dbInfo.toString());
logger.info(dbInfo.getMultipleHost());
}
use of com.navercorp.pinpoint.bootstrap.context.DatabaseInfo in project pinpoint by naver.
the class MySqlUrlParserTest method mysqlParse1.
@Test
public void mysqlParse1() {
DatabaseInfo dbInfo = jdbcUrlParser.parse("jdbc:mysql://ip_address:3306/database_name?useUnicode=yes&characterEncoding=UTF-8");
Assert.assertTrue(dbInfo.isParsingComplete());
Assert.assertEquals(dbInfo.getType(), MySqlConstants.MYSQL);
Assert.assertEquals(dbInfo.getHost().get(0), ("ip_address:3306"));
Assert.assertEquals(dbInfo.getDatabaseId(), "database_name");
Assert.assertEquals(dbInfo.getUrl(), "jdbc:mysql://ip_address:3306/database_name");
}
use of com.navercorp.pinpoint.bootstrap.context.DatabaseInfo in project pinpoint by naver.
the class JtdsJdbcUrlParserTest method testParse5.
@Test
public void testParse5() throws Exception {
// jdbc:jtds:sqlserver://server[:port][/database][;property=value[;...]]
// jdbc:jtds:sqlserver://server/db;user=userName;password=password
String url = "jdbc:jtds:sqlserver://10.xx.xx.xx;DatabaseName=CAFECHAT";
DatabaseInfo info = parser.parse(url);
Assert.assertTrue(info.isParsingComplete());
Assert.assertEquals(info.getType(), JtdsConstants.MSSQL);
Assert.assertEquals(info.getMultipleHost(), "10.xx.xx.xx");
Assert.assertEquals(info.getDatabaseId(), "CAFECHAT");
Assert.assertEquals(info.getUrl(), "jdbc:jtds:sqlserver://10.xx.xx.xx");
}
use of com.navercorp.pinpoint.bootstrap.context.DatabaseInfo in project pinpoint by naver.
the class JtdsJdbcUrlParserTest method testParse7.
@Test
public void testParse7() throws Exception {
String url = "jdbc:jtds:sqlserver://10.xx.xx.xx:1433/CAFECHAT;abc=1;bcd=2";
DatabaseInfo info = parser.parse(url);
Assert.assertTrue(info.isParsingComplete());
Assert.assertEquals(info.getType(), JtdsConstants.MSSQL);
Assert.assertEquals(info.getMultipleHost(), "10.xx.xx.xx:1433");
Assert.assertEquals(info.getDatabaseId(), "CAFECHAT");
Assert.assertEquals(info.getUrl(), "jdbc:jtds:sqlserver://10.xx.xx.xx:1433/CAFECHAT");
}
Aggregations