You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@git.apache.org on 2017/05/19 12:20:54 UTC

[GitHub] sureshanaparti commented on a change in pull request #2118: CLOUDSTACK-8830 : VM snapshot creation fails for 12 min

sureshanaparti commented on a change in pull request #2118: CLOUDSTACK-8830 : VM snapshot creation fails for 12 min 
URL: https://github.com/apache/cloudstack/pull/2118#discussion_r117467572
 
 

 ##########
 File path: test/integration/component/test_escalations_vmware.py
 ##########
 @@ -331,3 +334,46 @@ def test3_attach_ISO_in_RHEL7OSVM(self):
         self.assertEqual(attachedIsoName, "vmware-tools.iso", "vmware-tools.iso not attached")
         return
 
+    @attr(tags=["advanced", "basic"], required_hardware="true")
+    def test_04_check_vm_snapshot_creation_after_Instance_creation(self):
+        """
+        @summary: Test  if Snapshot creation is successful
+        in the first 10 minutes of VM deployment
+
+        Step1: Create a VM with any Service offering
+        Step2: Create a VM snapshot
+        Step3: Verify if SS creation is successful within first
+               10 minutes of VM deployment
+        """
+
+        if self.hypervisor.lower() not in ['vmware']:
+            self.skipTest("This test case is only for vmware. Hence, skipping the test")
+        vm = VirtualMachine.create(
+            self.userapiclient,
+            self.services["virtual_machine"],
+            accountid=self.account.name,
+            domainid=self.account.domainid,
+            serviceofferingid=self.service_offering.id,
+            templateid=self.template.id,
+            zoneid=self.zone.id
+        )
+
+        start_time = time.time()
+
+        snapshot_created_1 = VmSnapshot.create(
+            self.userapiclient,
+            vm.id
+        )
+        self.assertIsNotNone(
+            snapshot_created_1,
+            "Snapshot creation failed"
+        )
+
+        time_elapsed = time.time() - start_time
+
+        self.assertTrue(
+            time_elapsed < 600,
+            "Snapshot did not get created in the first 10 minutes after VM creation"
+        )
+
 
 Review comment:
   Sometimes VM snapshot may take more than 10 mins. In that case this assertion would be false.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services