diff options
author | Joss Armstrong <joss.armstrong@ericsson.com> | 2019-02-06 16:53:34 +0000 |
---|---|---|
committer | Patrick Brady <patrick.brady@att.com> | 2019-02-06 21:51:03 +0000 |
commit | 24ccf46cd06239bcb2173abf0dd43c689a4c8697 (patch) | |
tree | be4b07a3d7c5830400a47f9accde55d01830af48 /appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java | |
parent | 8fdee1fb6c2ce27f245a921536739ef2d4f678a2 (diff) |
Test coverage for DBConnectionPool
Increased class coverage to 100%
Issue-ID: APPC-1394
Change-Id: I7c8adb081b7342a5a18d3a2ca0238625317c6b4d
Signed-off-by: Joss Armstrong <joss.armstrong@ericsson.com>
Diffstat (limited to 'appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java')
-rw-r--r-- | appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/onap/appc/dao/util/dbcp/DBConnectionPool.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/onap/appc/dao/util/dbcp/DBConnectionPool.java b/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/onap/appc/dao/util/dbcp/DBConnectionPool.java index 161cc30ca..d201f399c 100644 --- a/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/onap/appc/dao/util/dbcp/DBConnectionPool.java +++ b/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/onap/appc/dao/util/dbcp/DBConnectionPool.java @@ -5,6 +5,8 @@ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Copyright (C) 2017 Amdocs + * ================================================================================ + * Modifications Copyright (C) 2019 Ericsson * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,7 +79,6 @@ public class DBConnectionPool implements DBConnectionPoolService { if (dataSource == null) { throw new DBConnectionPoolException(); } - Connection connection = null; try { connection = dataSource.getConnection(); @@ -123,7 +124,7 @@ public class DBConnectionPool implements DBConnectionPoolService { return map; } - private BasicDataSource getBasicDataSource(String connectURI, String username, String password, + protected BasicDataSource getBasicDataSource(String connectURI, String username, String password, String driverClass, Integer initialSize, Integer maxtotal, Integer maxIdle, Integer maxWaitMillis, Integer minIdle) { BasicDataSource dataSource = new BasicDataSource(); |