コード例 #1
0
 @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();
 }
コード例 #2
0
ファイル: TestSystemTests.java プロジェクト: PaloAlto/bonecp
 @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);
 }
コード例 #3
0
 /** 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);
 }