-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18733/
-----------------------------------------------------------
Review request for cloudstack, Alena Prokharchyk, daan Hoogland, and Hugo
Trippaers.
Repository: cloudstack-git
Description
-------
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.
Diffs
-----
engine/schema/src/com/cloud/upgrade/dao/DatabaseAccessObject.java
PRE-CREATION
engine/schema/src/com/cloud/upgrade/dao/DbUpgradeUtils.java af23b87
engine/schema/test/com/cloud/upgrade/dao/DatabaseAccessObjectTest.java
PRE-CREATION
engine/schema/test/com/cloud/upgrade/dao/DbUpgradeUtilsTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/18733/diff/
Testing
-------
Ran all unit tests in eclipse.
Ran "mvn clean install".
Thanks,
Miguel Ferreira