Change in ovirt-engine[master]: core: Use DBUnit flat format

Code Review gerrit at ovirt.org
Thu May 11 13:05:57 UTC 2017


>From Allon Mureinik <amureini at redhat.com>:

Allon Mureinik has submitted this change and it was merged.

Change subject: core: Use DBUnit flat format
......................................................................


core: Use DBUnit flat format

This patch converts fixtures.xml from the DBUnit's old XML format to
the newer flat XML format.

The motivation here is maintainability - each row becomes
self-descriptive, and can be read and understood independently,
instead of having to scroll up several (dozens, if not hundreds of)
rows to read the column definition.
Comparing the size of the file before and after this patch could give
a good idea about the improved maintainability. Before the patch,
this file weighed 424KB and contained 10091 rows. After applying this
patch, it weighs 268KB (~37% less) and contains only 743 rows (~93%
less).

The process:
1. The file was converted using DBUnit Transformer [1]
2. The code was changed to load a flat XML instead of the traditional
   XML.
3. Empty rows were added between each table to make the resulting
   file easier to read.
4. FixturesTest, which is no longer needed with the new format, was
   removed.
5. The DAO tests were run to assure they were not broken, naturally.

[1] https://github.com/mureinik/dbunit-transformer

Change-Id: I48c1de98385c39890002ec3d06f7928bab2cb2aa
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
D backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/FixturesTest.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/BaseDaoTestCase.java
M backend/manager/modules/dal/src/test/resources/fixtures.xml
3 files changed, 625 insertions(+), 10,070 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Allon Mureinik: Verified; Passed CI tests
  Moti Asayag: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/76679
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I48c1de98385c39890002ec3d06f7928bab2cb2aa
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Benny Zlotnik <bzlotnik at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list