File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -465,6 +465,8 @@ public void memBalloonDefTestNone() {
465465
466466 @ Test
467467 public void memBalloonDefTestVirtio () {
468+ LibvirtVMDef .setGlobalQemuVersion (5001000L );
469+ LibvirtVMDef .setGlobalLibvirtVersion (6009000L );
468470 String expectedXml = "<memballoon model='virtio' autodeflate='on' freePageReporting='on'>\n <stats period='60'/>\n </memballoon>" ;
469471 MemBalloonDef memBalloonDef = new MemBalloonDef ();
470472 memBalloonDef .defVirtioMemBalloon ("60" );
@@ -474,6 +476,17 @@ public void memBalloonDefTestVirtio() {
474476 assertEquals (expectedXml , xmlDef );
475477 }
476478
479+ @ Test
480+ public void memBalloonDefTestVirtioOld () {
481+ String expectedXml = "<memballoon model='virtio'>\n <stats period='60'/>\n </memballoon>" ;
482+ MemBalloonDef memBalloonDef = new MemBalloonDef ();
483+ memBalloonDef .defVirtioMemBalloon ("60" );
484+
485+ String xmlDef = memBalloonDef .toString ();
486+
487+ assertEquals (expectedXml , xmlDef );
488+ }
489+
477490 @ Test
478491 public void testHypervEnlightDef () {
479492 LibvirtVMDef .FeaturesDef featuresDef = new LibvirtVMDef .FeaturesDef ();
You can’t perform that action at this time.
0 commit comments