Frank Kobzik has posted comments on this change.

Change subject: core: hotfix daotests in VmStaticDAOTest
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/35914/1/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmStaticDAOTest.java
File 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmStaticDAOTest.java:

Line 328:     public void 
testGetOrderedVmGuidsForRunMultipleActionsByMigrationSupport() {
Line 329:         List<VmStatic> vmStatics = dao.getAllByName(STATIC_VM_NAME);
Line 330:         if (vmStatics.size() > 3) { // migration support has only 3 
possible values
Line 331:             vmStatics = vmStatics.subList(0, 3);
Line 332:         }
> what if the first 3 VMs have the same value of migration support? don't you
I don't think this can happen. This is what I think the test does:
1, pulls some VmStatics from the fake db,
2, sets their migrationSupport att to all possible values (initStaticBlahblah 
method on 333) and writes them back in the fake db,
3, retrieves their ids from the fake db (now with respect to the ordering),
4, compares their uuids.

I think better solution would be to adjust the comparing function so that it 
ignores swap between equal VmStatic instances from MigrationSupport ordering 
POV. But this was meant to be a hotfix ;), we have failing daotests on master 
for some time.
Line 333:         VmStatic[] vmStaticArrayInDescOrder = 
initVmStaticsOrderedByMigrationSupport(vmStatics);
Line 334: 
Line 335:         // execute
Line 336:         List<Guid> vmStaticGuidsInDb =


-- 
To view, visit http://gerrit.ovirt.org/35914
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0ea611effabb69a693194a6a0639f2d3c17d08e5
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Frank Kobzik <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to