Commit Graph

2 Commits

Author SHA1 Message Date
Santhosh Edukulla eb16a4e9e3 Fixed Resource Leaks
Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit c690320f0b)
2014-07-28 16:02:42 +02:00
miguelaferreira ea0dec77d9 Refactor DbUpgradeUtils
- Move database access code to new class DatabaseAccessObject.
    This was done to ease the effort of testing, since
    DbUpgradeUtils has a static API and it is harder to mock
    static things with Mockito.
  - Log exceptions even if ignored
  - Add unit tests for both DbUpgradeUtils and DatabaseAccessObject
  - DbUpgradeUtils.dropTableColumnsIfExist(...) no longer throws
CloudRuntimeException to make it consistent with the other methods in
the class

Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-03-06 14:48:35 +01:00