summaryrefslogtreecommitdiffstats
path: root/dblib/provider/src/test
AgeCommit message (Collapse)AuthorFilesLines
2019-07-25JUNIT-ConfigurationException.javaanushadasari1-14/+0
JUNIT for ConfigurationException.java Issue-ID: CCSDK-1520 Change-Id: I64e50083b9b0fe40fa0ba32723e30adb0dbce08e Signed-off-by: anushadasari <danush10@in.ibm.com>
2019-02-21Increase code coverageTimoney, Dan (dt5972)1-0/+95
Added junit test cases, and updated jacoco config in provider/base to include provider tests as well Change-Id: I8f384b3a4dd7362f004eaa959cd0c634edf0ddbe Issue-ID: CCSDK-1096 Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
2019-02-01Junit for EncShellCommand.javaDriptaroop Das1-0/+41
Junit for EncShellCommand.java Issue-ID: CCSDK-1016 Change-Id: I7cbdb49b6e04ce6a69a48f9a507c7db959698140 Signed-off-by: Driptaroop Das <driptaroop.das@in.ibm.com>
2018-10-02added test cases to CachedDataSourceSandeep J1-0/+24
to increase code coverage Issue-ID: CCSDK-595 Change-Id: I7d5a5ed59538e7d6e1a7d00dfba690eedc7c2e22 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
2018-09-24Merge "added test cases to TestDBResourceManager"Dan Timoney1-24/+39
2018-09-24added test cases to TestDBResourceManagerSandeep J1-24/+39
to increase code coverage Issue-ID: CCSDK-595 Change-Id: I8def1aa2e4108f48bc549e63e533f8a63e7a0377 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
2018-09-24formatted code and added test caseSandeep J1-78/+81
to increase code coverage in CachedDataSourceTest Issue-ID: CCSDK-595 Change-Id: I10c2fec758bfb93587b4f5b096828a43a64039b0 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
2018-03-08Fix sonar related itemsRich Tabedzki4-0/+231
Changes made: * Optimized TerminatingCachedDataSource * Added additional unit tests Change-Id: I0a83c993898e2bee11b8d3c5df8f95b4b216e9b8 Issue-ID: CCSDK-151 Signed-off-by: Rich Tabedzki <richard.tabedzki@att.com>
2018-03-02Updated master database detection algorithmRich Tabedzki2-0/+30
Changes made: * updated algorithm in DBResourceManager * Updated CachedDataSource, JdbcDBCachedDataSource * added new unit tests Change-Id: I4f6bbeb3839f55d183d7e762743fbc9171b63b1a Issue-ID: CCSDK-192 Signed-off-by: Rich Tabedzki <richard.tabedzki@att.com>
2017-10-03Add unit tests for dblibDan Timoney2-0/+93
Add unit test case for dblib/provider, using MariaDB4J as database. Change-Id: I18492595a9d54999c3d52b56ecfe33d0d2cae019 Issue-ID: CCSDK-106 Signed-off-by: Dan Timoney <dtimoney@att.com>
2017-09-20Abstract utility classes for re-useRyan Goulding4-76/+0
When looking at the existing uses of BundleActivator(s), it became immediately clear that other parts of the code have a strategy based properties file resolution very similar to those abstracted by dblib. This change aggregates a separate utils bundle for this functionality, which is further abstracted for potential reuse with other use cases. The next use case is in the sli bundle, which will be handled in a follow-up patch. Issue-Id: SDNC-54 Change-Id: Ie4d4bb679617474b1983e6044c08cca1742b9893 Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
2017-09-13Use oparent-odlparent in sli/coreDan Timoney4-0/+0
Update sli/core to use oparent-odlparent. To prevent verify builds from failing due to unit test errors, also changed unit tests that require database access to use MariaDB4j to start up a local MariaDB database. Change-Id: I928b7e1e83bdb328ca9e0785c8b81f67f982eeda Issue-ID: CCSDK-43 Signed-off-by: Dan Timoney <dtimoney@att.com>
2017-09-13Remove unused imports in java filesRyan Goulding1-2/+0
Code sanitation-- remove unused imports. Issue-Id: SDNC-79 Change-Id: I5306a9b90f302086459fcac98d04f541ba7c79a4 Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
2017-09-06Fix service registration for SDNCRyan Goulding4-0/+78
Addresses the inherit race conditions associated with the BundleActivator abstraction. From lessons learned in OpenDaylight project, dependency injection and service injection via Aries Blueprint is faster, more deterministic, and has better error messaging than using BundleActivator(s). This change addresses several aspects: 1) DBLIBResourceActivator is changed to DBLIBResourceProvider. This was done in order to imply that this is no longer an Activator or subclass of an Activator. The class is a POJO. 2) DBLIBResourceProvider is split from a single monolithic method into several more manageable and better documented methods. 3) Documentation surrounding the resolution of the DB properties is added so that a developer can more easily identify the strategy (priority) used for resolving properties. 4) dblib-blueprint.xml is added. This is used to register the configuration bean (DBLIBResourceProvider), and pass it as an argument to the actual Service (DBLIBResourceManager). 5) Tests are added to test the functionality and resolution of the properties file loading. Issue-Id: SDNC-54 Change-Id: Ie9d5fb423ae7a67e9aec026c78321537399cc308 Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>