Vered Volansky has posted comments on this change.
Change subject: core: ImportVm test cleanup: VM name generation
......................................................................
Patch Set 10: (2 inline comments)
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVmCommandTest.java
Line 108: */
Line 109: @Test
Line 110: public void testOtherFieldsNotValidatedInImport() {
Line 111: ImportVmParameters parameters = createParameters();
Line 112: String stringOf5000Chars =
Please correct me if I'm wrong, but the generated string is of size
GENERAL_MAX_SIZE, which doesn't have to be 5000 (and is actually 4000 according
to my check, though it doesn't matter).
Line 113:
RandomUtils.instance().nextNameString(BusinessEntitiesDefinitions.GENERAL_MAX_SIZE
+ 1);
Line 114:
parameters.getVm().setUserDefinedProperties(stringOf5000Chars);
Line 115: parameters.setImportAsNewEntity(true);
Line 116: ImportVmCommand command = new ImportVmCommand(parameters);
....................................................
File
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/RandomUtils.java
Line 368: *
Line 369: * @param length
Line 370: * The requested length of the string.
Line 371: */
Line 372: public String nextNameString(int length) {
I don't get the naming of this method (I get that overloading is taken, but
this name doesn't seem right). I also don't get the naming of the new constant.
The returned string isn't being used as a name, specifically not in this patch,
and even if it were, this class shouldn't know about the uses.
Line 373: return nextString(length, ENTITY_NAME_CHARS);
Line 374: }
Line 375:
Line 376: /**
--
To view, visit http://gerrit.ovirt.org/9619
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1f04e067e8bce2c6cd1010f83a44809a3c8c464c
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches