cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ro...@apache.org
Subject [cloudstack] 03/03: wait until 3*advert_int+skew time before checking router status
Date Fri, 08 Dec 2017 07:02:47 GMT
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 89f860794abdc6f5df822470d41c47211dd4edb8
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
AuthorDate: Fri Dec 8 12:32:02 2017 +0530

    wait until 3*advert_int+skew time before checking router status
    
    Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
---
 test/integration/smoke/test_vpc_redundant.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/integration/smoke/test_vpc_redundant.py b/test/integration/smoke/test_vpc_redundant.py
index 2c7f4ae..e801792 100644
--- a/test/integration/smoke/test_vpc_redundant.py
+++ b/test/integration/smoke/test_vpc_redundant.py
@@ -275,7 +275,7 @@ class TestVPCRedundancy(cloudstackTestCase):
         cls.logger.setLevel(logging.DEBUG)
         cls.logger.addHandler(cls.stream_handler)
 
-        return
+        cls.advert_int = int(Configurations.list(cls.api_client, name="router.redundant.vrrp.interval")[0].value)
 
     @classmethod
     def tearDownClass(cls):
@@ -283,7 +283,6 @@ class TestVPCRedundancy(cloudstackTestCase):
             cleanup_resources(cls.api_client, cls._cleanup)
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
-        return
 
     def setUp(self):
         self.routers = []
@@ -348,6 +347,9 @@ class TestVPCRedundancy(cloudstackTestCase):
         vals = ["MASTER", "BACKUP", "UNKNOWN"]
         cnts = [0, 0, 0]
 
+        # Wait until 3*advert_int+skew time per keepalived spec
+        time.sleep(3 * self.advert_int + 1)
+
         result = "UNKNOWN"
         self.query_routers(count, showall)
         for router in self.routers:
@@ -404,6 +406,7 @@ class TestVPCRedundancy(cloudstackTestCase):
         self.logger.debug('Stopping router %s' % router.id)
         cmd = stopRouter.stopRouterCmd()
         cmd.id = router.id
+        cmd.forced = True
         self.apiclient.stopRouter(cmd)
 
     def reboot_router(self, router):

-- 
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <commits@cloudstack.apache.org>.

Mime
View raw message