cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gir...@apache.org
Subject git commit: updated refs/heads/4.3 to e4acedb
Date Mon, 30 Dec 2013 09:50:01 GMT
Updated Branches:
  refs/heads/4.3 cbe93be2e -> e4acedbcb


CLOUDSTACK-5342: Add sleep before adding nic to verify qemu bug.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e4acedbc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e4acedbc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e4acedbc

Branch: refs/heads/4.3
Commit: e4acedbcb124b587575cdffa4b78ec47813c9a2b
Parents: cbe93be
Author: Girish Shilamkar <girish@clogeny.com>
Authored: Mon Dec 30 15:19:52 2013 +0530
Committer: Girish Shilamkar <girish@clogeny.com>
Committed: Mon Dec 30 15:19:52 2013 +0530

----------------------------------------------------------------------
 test/integration/component/test_add_remove_network.py | 9 +++++++++
 tools/marvin/marvin/integration/lib/base.py           | 3 +++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e4acedbc/test/integration/component/test_add_remove_network.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_add_remove_network.py b/test/integration/component/test_add_remove_network.py
index 4529ec7..8ec2971 100644
--- a/test/integration/component/test_add_remove_network.py
+++ b/test/integration/component/test_add_remove_network.py
@@ -60,6 +60,7 @@ from marvin.cloudstackAPI import (addNicToVirtualMachine,
 
 from marvin.codes import PASS
 import random
+import time
 
 class Services:
     """Test Add Remove Network Services
@@ -1159,6 +1160,8 @@ class TestFailureScenariosAddNetworkToVM(cloudstackTestCase):
         cmd.networkid = self.isolated_network.id
 
         with self.assertRaises(Exception) as e:
+            # waiting before adding nic to avoid error while "plugging nic"
+            time.sleep(5)
             self.apiclient.addNicToVirtualMachine(cmd)
 	    self.debug("addNicToVirtualMachine API failed with exception: %s" % e.exception)
 
@@ -1178,6 +1181,8 @@ class TestFailureScenariosAddNetworkToVM(cloudstackTestCase):
         cmd.networkid = random_gen(id="network_id", size=30)
 
         with self.assertRaises(Exception) as e:
+            # waiting before adding nic to avoid error while "plugging nic"
+            time.sleep(5)
             self.apiclient.addNicToVirtualMachine(cmd)
 	    self.debug("addNicToVirtualMachine API failed with exception: %s" % e.exception)
 
@@ -1224,6 +1229,8 @@ class TestFailureScenariosAddNetworkToVM(cloudstackTestCase):
         cmd.networkid = isolated_network.id
 
         with self.assertRaises(Exception) as e:
+            # waiting before adding nic to avoid error while "plugging nic"
+            time.sleep(5)
             self.apiclient.addNicToVirtualMachine(cmd)
 	    self.debug("addNicToVirtualMachine API failed with exception: %s" % e.exception)
 
@@ -1274,6 +1281,8 @@ class TestFailureScenariosAddNetworkToVM(cloudstackTestCase):
         self.dedbug("Trying to add isolated network to VM (both in basic zone,\
                     this operation should fail")
         with self.assertRaises(Exception) as e:
+            # waiting before adding nic to avoid error while "plugging nic"
+            time.sleep(5)
             self.apiclient.addNicToVirtualMachine(cmd)
 	    self.debug("addNicToVirtualMachine API failed with exception: %s" % e.exception)
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e4acedbc/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py
index aa23029..409530c 100755
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -546,6 +546,9 @@ class VirtualMachine:
         if ipaddress:
             cmd.ipaddress = ipaddress
 
+        # waiting before adding nic to avoid error while "plugging nic"
+        time.sleep(5)
+
         return apiclient.addNicToVirtualMachine(cmd)
 
     def remove_nic(self, apiclient, nicId):


Mime
View raw message