Change in ovirt-engine[master]: core: Unit test collections
amureini at redhat.com
amureini at redhat.com
Sun Sep 11 20:49:44 UTC 2016
Allon Mureinik has submitted this change and it was merged.
Change subject: core: Unit test collections
......................................................................
core: Unit test collections
Use the proper collections to reduce code bloating and improve
performance:
- Collections.emptyList instead of an empty collection
- Collections.singletonList instead of a list with one element
- Collections.singleton instead of a set with one element
- Arrays.asList instead of manually filling a list
Change-Id: I0a547df6bcb0bc0cfe6d7f13828280e4875ad0a0
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddVmTemplateCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportExportRepoImageCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/MacPoolValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RemoveVdsCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RunVmCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateWatchdogCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/exportimport/ImportVMFromConfigurationCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/exportimport/ImportVmTemplateCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GlusterTasksSyncJobTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/host/HostUpgradeManagerTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/hostedengine/HostedEngineConfigFetcherTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/job/JobRepositoryTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/memory/sdcomparators/StorageDomainNumberOfVmDisksComparatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/migration/ConvergenceConfigProviderTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/host/HostSetupNetworksValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/host/NicNameNicIdCompleterTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/host/UnmanagedNetworkValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/host/VfSchedulerImplTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/numa/vm/AddVmNumaNodesCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/numa/vm/NumaValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/numa/vm/RemoveVmNumaNodesCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/numa/vm/SetVmNumaNodesCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/numa/vm/UpdateVmNumaNodesCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/pm/FenceProxyLocatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/profiles/DiskProfileHelperTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/provider/network/GetAllExternalNetworksOnProviderQueryTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/AffinityRulesEnforcementManagerTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/policyunits/LabelFilterPolicyUnitTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/snapshots/GetAllVmSnapshotsFromConfigurationByVmIdQueryTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/snapshots/RemoveDiskSnapshotsCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/snapshots/RemoveSnapshotCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/snapshots/RestoreAllSnapshotsCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/disk/AddDiskCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/disk/MoveDisksCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/domain/AttachStorageDomainToPoolCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/domain/ImportHostedEngineStorageDomainCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/domain/StorageDomainCommandBaseTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/lsm/LiveMigrateVmDisksCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/pool/ForceSelectSPMCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/repoimage/ExportRepoImageCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/InClusterUpgradeValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/NetworkAttachmentsValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/VmWatchdogValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/network/NetworkAttachmentIpConfigurationValidatorTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/storage/DiskSnapshotsValidatorTest.java
M backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/BusinessEntityMapTest.java
M backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/EntitiesTest.java
M backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/VmStatisticsTest.java
M backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/utils/NetworkLabelFormatValidatorTest.java
M backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/utils/pm/FenceProxySourceTypeHelperTest.java
M backend/manager/modules/compat/src/test/java/org/ovirt/engine/core/compat/PropertyInfoTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmsResourceTest.java
M backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/DisjointRangesTest.java
M backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ErrorTranslatorTest.java
M backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ObjectIdentityCheckerTest.java
M backend/manager/modules/vdsbroker/src/test/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HostNetworkAttachmentsPersisterTest.java
M frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/FrontendActionTest.java
M frontend/webadmin/modules/gwt-common/src/test/java/org/ovirt/engine/ui/common/binding/ElementIdTypeParserTest.java
M frontend/webadmin/modules/uicommonweb/src/test/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/ExecuteNetworkCommandInNetworkOperationTest.java
M frontend/webadmin/modules/uicommonweb/src/test/java/org/ovirt/engine/ui/uicommonweb/models/vms/BaseVmListModelTest.java
M frontend/webadmin/modules/uicommonweb/src/test/java/org/ovirt/engine/ui/uicommonweb/validation/CidrValidationTest.java
M frontend/webadmin/modules/uicommonweb/src/test/java/org/ovirt/engine/ui/uicommonweb/validation/KeyValueFormatValidationTest.java
64 files changed, 184 insertions(+), 195 deletions(-)
Approvals:
Allon Mureinik: Verified; Looks good to me, approved; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/63584
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0a547df6bcb0bc0cfe6d7f13828280e4875ad0a0
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: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Sahina Bose <sabose 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