@Test(expected = SQLException.class) public void testDBConnectionInvalidUsername() throws SQLException { CommonTestUtils.logTestInfo("Test trying to start up with an invalid username/pass combo."); config.setUsername("non existent"); new BoneCP(config); CommonTestUtils.logPass(); }
@Before public void beforeTest() { config.setJdbcUrl(CommonTestUtils.url); config.setUsername(CommonTestUtils.username); config.setPassword(CommonTestUtils.password); config.setIdleConnectionTestPeriod(10000); config.setIdleMaxAge(0); config.setStatementsCacheSize(0); config.setReleaseHelperThreads(0); config.setStatementsCachedPerConnection(30); }
/** Init. */ @Before public void beforeTest() { config.setJdbcUrl(CommonTestUtils.url); config.setUsername(CommonTestUtils.username); config.setPassword(CommonTestUtils.password); config.setIdleConnectionTestPeriodInMinutes(0); config.setIdleMaxAgeInMinutes(0); config.setStatementsCacheSize(0); config.setReleaseHelperThreads(0); config.setDisableConnectionTracking(true); config.setStatementReleaseHelperThreads(0); config.setStatisticsEnabled(true); }