Change in vdsm[master]: numa: unbreak tests after move to periodic

fromani at redhat.com fromani at redhat.com
Tue Mar 31 12:19:35 UTC 2015


Francesco Romani has uploaded a new change for review.

Change subject: numa: unbreak tests after move to periodic
......................................................................

numa: unbreak tests after move to periodic

Due to a rebase mistake, this hunk which
fixes the tests after the move to periodic operations,
was included into the wrong change.

This patch extracts to unbreak current master.

Change-Id: I778ffec9dfdb847be3c393bc6e6accc923df61be
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M tests/numaUtilsTests.py
1 file changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/39391/1

diff --git a/tests/numaUtilsTests.py b/tests/numaUtilsTests.py
index 5a5a8ff..e810a31 100644
--- a/tests/numaUtilsTests.py
+++ b/tests/numaUtilsTests.py
@@ -23,6 +23,7 @@
 
 from testlib import VdsmTestCase as TestCaseBase
 from monkeypatch import MonkeyPatch
+from monkeypatch import MonkeyPatchScope
 
 import caps
 import numaUtils
@@ -70,8 +71,13 @@
                                          'memory': '1024',
                                          'nodeIndex': 1}]}
         with fake.VM(VM_PARAMS) as testvm:
-            testvm._vmStats = fake.VmStatsThread(testvm)
             expectedResult = {'0': [0, 1], '1': [0, 1]}
             self.assertTrue(testvm.hasGuestNumaNode)
-            vmNumaNodeRuntimeMap = numaUtils.getVmNumaNodeRuntimeInfo(testvm)
-            self.assertEqual(expectedResult, vmNumaNodeRuntimeMap)
+            sample = [(0, 1, 19590000000L, 1),
+                      (1, 1, 10710000000L, 1),
+                      (2, 1, 19590000000L, 0),
+                      (3, 1, 19590000000L, 2)]
+            with MonkeyPatchScope([(numaUtils, "_get_vcpu_positioning",
+                                  lambda vm: sample)]):
+                vm_numa_info = numaUtils.getVmNumaNodeRuntimeInfo(testvm)
+                self.assertEqual(expectedResult, vm_numa_info)


-- 
To view, visit https://gerrit.ovirt.org/39391
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I778ffec9dfdb847be3c393bc6e6accc923df61be
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list