Roy Golan has submitted this change and it was merged.
Change subject: sla: Add support for basic PolicyUnit testing
......................................................................
sla: Add support for basic PolicyUnit testing
This patch adds a rudimentary infrastructure for unit testing
policy units.
A (very simple) CSV loader is included with dynamic entity field
recognition using introspection and simple tests for
PowerSavingBalancePolicyUnit and EvenDistributionBalancePolicyUnit
are included as an example.
Change-Id: Ied30d4ac4c1eeee2911e5f276d5333982147effa
Signed-off-by: Martin Sivak <msivak(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SlaValidator.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CPUPolicyUnit.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CpuAndMemoryBalancingPolicyUnit.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PowerSavingBalancePolicyUnit.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/utils/VdsCpuUsageComparator.java
A
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/policyunits/AbstractPolicyUnitTest.java
A
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/policyunits/CpuAndMemoryBalancingPolicyUnitTest.java
A
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/policyunits/EvenDistributionBalancePolicyUnitTest.java
A
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/scheduling/policyunits/PowerSavingBalancePolicyUnitTest.java
A
backend/manager/modules/bll/src/test/resources/scheduling/basic_balancing_hosts_cpu_load.csv
A
backend/manager/modules/bll/src/test/resources/scheduling/basic_balancing_hosts_cpumem_load.csv
A
backend/manager/modules/bll/src/test/resources/scheduling/basic_balancing_hosts_cpumem_medium_load.csv
A
backend/manager/modules/bll/src/test/resources/scheduling/basic_balancing_hosts_mem_load.csv
A backend/manager/modules/bll/src/test/resources/scheduling/basic_balancing_vms.csv
A
backend/manager/modules/bll/src/test/resources/scheduling/basic_power_saving_hosts_cpu_load.csv
A
backend/manager/modules/bll/src/test/resources/scheduling/basic_power_saving_hosts_cpumem_load.csv
A
backend/manager/modules/bll/src/test/resources/scheduling/basic_power_saving_hosts_medium_load.csv
A
backend/manager/modules/bll/src/test/resources/scheduling/basic_power_saving_hosts_mem_load.csv
A
backend/manager/modules/bll/src/test/resources/scheduling/basic_power_saving_hosts_no_load.csv
A backend/manager/modules/bll/src/test/resources/scheduling/basic_power_saving_vms.csv
20 files changed, 643 insertions(+), 18 deletions(-)
Approvals:
Martin Sivák: Verified
Roy Golan: Looks good to me, approved
--
To view, visit
https://gerrit.ovirt.org/39728
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ied30d4ac4c1eeee2911e5f276d5333982147effa
Gerrit-PatchSet: 19
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak(a)redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Tomer Saban <tsaban(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org