use of com.navercorp.pinpoint.plugin.jdbc.oracle.parser.OracleConnectionStringException in project pinpoint by naver.
the class OracleNetConnectionDescriptorParserTest method parseEofError.
@Test
public void parseEofError() {
String rac = "jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE = off )" + "(ADDRESS = ( PROTOCOL = TCP)(HOST = 1.2.3.4 ) (PORT = 1521 ))" + // " ( CONNECT_DATA = ( SID = sid ) ) )";
" ( CONNECT_DATA = ( SID = sid ) ) ";
OracleNetConnectionDescriptorParser parser = new OracleNetConnectionDescriptorParser(rac);
try {
KeyValue keyValue = parser.parse();
Assert.fail();
} catch (OracleConnectionStringException e) {
logger.info("Expected error", e);
}
}
use of com.navercorp.pinpoint.plugin.jdbc.oracle.parser.OracleConnectionStringException in project pinpoint by naver.
the class OracleNetConnectionDescriptorParserTest method parseSyntaxError2.
@Test
public void parseSyntaxError2() {
String rac = "jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE = off )" + "(ADDRESS = ( PROTOCOL = TCP) (HOST = 1.2.3.4 ) ( = 1521 ))" + " ( CONNECT_DATA = ( SID = sid ) ) )";
// removed port
OracleNetConnectionDescriptorParser parser = new OracleNetConnectionDescriptorParser(rac);
try {
KeyValue keyValue = parser.parse();
Assert.fail();
} catch (OracleConnectionStringException e) {
logger.info("Expected error", e);
}
}
use of com.navercorp.pinpoint.plugin.jdbc.oracle.parser.OracleConnectionStringException in project pinpoint by naver.
the class OracleNetConnectionDescriptorParserTest method parseSyntaxError.
@Test
public void parseSyntaxError() {
String rac = "jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE = off )" + "(ADDRESS = ( PROTOCOL = TCP) HOST = 1.2.3.4 ) (PORT = 1521 ))" + " ( CONNECT_DATA = ( SID = sid ) ) )";
OracleNetConnectionDescriptorParser parser = new OracleNetConnectionDescriptorParser(rac);
try {
KeyValue keyValue = parser.parse();
Assert.fail();
} catch (OracleConnectionStringException e) {
logger.info("Expected error", e);
}
}
Aggregations