Examples of CoverageHook


Examples of com.jolbox.bonecp.hooks.CoverageHook

    expect(mockPool.getConfig()).andReturn(mockConfig).anyTimes();
    expect(mockPool.getStatistics()).andReturn(new Statistics(mockPool)).anyTimes();
    expect(mockConfig.isStatisticsEnabled()).andReturn(true).anyTimes();
    expect(mockConfig.isCloseOpenStatements()).andReturn(true).anyTimes();
    expect(mockConfig.getQueryExecuteTimeLimitInMs()).andReturn(1L).anyTimes();
    expect(mockConfig.getConnectionHook()).andReturn(new CoverageHook()).anyTimes();
    replay(mockConnection, mockPool, mockConfig);
    testClass = new StatementHandle(mockClass, "", mockCallableStatementCache, mockConnection, "testSQL", true);
    reset(mockClass, mockCallableStatementCache, mockConnection, mockPool);
   
      Logger shMockLogger = TestUtils.mockLogger(testClass.getClass());
View Full Code Here

Examples of com.jolbox.bonecp.hooks.CoverageHook

    this.config.setJdbcUrl("jdbc:mock:driver");
    this.config.setMinConnectionsPerPartition(2);
    this.config.setMaxConnectionsPerPartition(2);
    this.config.setAcquireRetryDelayInMs(1);
    this.config.setAcquireRetryAttempts(2);
    this.config.setConnectionHook(new CoverageHook());
    BoneCP pool = new BoneCP(this.config);
    reset(mockConnection);
    this.config.setTransactionRecoveryEnabled(false);

    makeThreadSafe(mockConnection, true);
View Full Code Here

Examples of com.jolbox.bonecp.hooks.CoverageHook

    dsb.setAcquireRetryDelay(-1);
    dsb.setAcquireRetryAttempts(0);
    dsb.setMaxConnectionsPerPartition(100);
    dsb.setMinConnectionsPerPartition(30);
    dsb.setTransactionRecoveryEnabled(true);
    dsb.setConnectionHook(new CoverageHook());
    dsb.setLazyInit(false);
    dsb.setStatementsCachedPerConnection(30);
    dsb.setStatementsCacheSize(30);
    dsb.setReleaseHelperThreads(0);
    dsb.setDriverClass("com.jolbox.bonecp.MockJDBCDriver");
View Full Code Here

Examples of com.jolbox.bonecp.hooks.CoverageHook

      expect(mockConfig.getAcquireRetryDelayInMs()).andReturn(1000L).anyTimes();
      expect(mockConfig.getAcquireRetryAttempts()).andReturn(0).anyTimes();
      expect(mockConfig.getDefaultTransactionIsolationValue()).andReturn(-1).anyTimes();
      expect(mockConfig.getDefaultAutoCommit()).andReturn(false).anyTimes();

    expect(mockConfig.getConnectionHook()).andReturn(new CoverageHook()).anyTimes();
    expect(mockConfig.isLazyInit()).andReturn(false).anyTimes();
   
      mockPool = EasyMock.createNiceMock(BoneCP.class);
      expect(mockPool.getDbIsDown()).andReturn(new AtomicBoolean()).anyTimes();
      expect(mockPool.getConfig()).andReturn(mockConfig).anyTimes();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.