Maor Lipchuk has posted comments on this change. Change subject: core: UpdateStoragePoolCommandTest - Arrays.asList() ......................................................................
Patch Set 2: Code-Review-1 (1 comment) Arrays.asList() will fix the size of the list. and will restrict us from adding new objects into the list when we want to. I prefer not to use this in the test, since it will make our test less dynamic and more unmaintenable http://gerrit.ovirt.org/#/c/37427/2/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommandTest.java File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommandTest.java: Line 275: StorageDomain sdISCI = createStorageDomain(StorageFormatType.V3, StorageType.ISCSI); Line 276: StorageDomain sdNFS = createStorageDomain(StorageFormatType.V3, StorageType.NFS); Line 277: setAttachedDomains(sdISCI, sdNFS); Line 278: Line 279: List<StorageType> storageTypes = Arrays.asList(sdISCI.getStorageType(), sdNFS.getStorageType()); Arrays.asList() is a horrible function, it will fix the size of the list. and will restrict us from adding new objects into the list, since the list returned from it is emutable. I prefer not to use this in the test, since it will make our test less dynamic and more unmaintenable Line 280: Line 281: doReturn(storageTypes).when(spDao).getStorageTypesInPool(any(Guid.class)); Line 282: canDoActionFailed(VdcBllMessages.ACTION_TYPE_FAILED_MIXED_STORAGE_TYPES_NOT_ALLOWED); Line 283: } -- To view, visit http://gerrit.ovirt.org/37427 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I03bd7b9fcc8db31b69e17b75fdd5a4c1e1e95493 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Amit Aviram <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Idan Shaby <[email protected]> Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[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
