From 0bded420c58467c189c0c45c6b35b30f71a03ad6 Mon Sep 17 00:00:00 2001 From: Anusha Ramineni Date: Mon, 21 Nov 2016 08:56:28 +0530 Subject: [PATCH] Refactor policy synchronizer This commit adds the following 1. Move policy and rule synchronizer to new class from policy engine 2. support sync of single datasource policy 3. Expose synchronizer endpoints via PE to listen to broadcast requests for synchronization 4. update the functions to synchronize one policy instead looping through all policies everytime. Partially-Implements blueprint refactor-synchronizer Change-Id: I0fc4822daf6c49e6885471530a072caa03ce492b --- tests/scenario/congress_ha/test_ha.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/scenario/congress_ha/test_ha.py b/tests/scenario/congress_ha/test_ha.py index a99e3a8..3a803e0 100644 --- a/tests/scenario/congress_ha/test_ha.py +++ b/tests/scenario/congress_ha/test_ha.py @@ -246,13 +246,13 @@ class TestHA(manager_congress.ScenarioPolicyBase): if not test.call_until_true( func=lambda: self._check_resource_exists( self.client, 'datasource'), - duration=60, sleep_for=1): + duration=90, sleep_for=1): raise exceptions.TimeoutException( "primary doesn't have fake dataservice, data sync failed") if not test.call_until_true( func=lambda: self._check_resource_exists( self.client, 'policy'), - duration=60, sleep_for=1): + duration=90, sleep_for=1): raise exceptions.TimeoutException( "primary doesn't have fake policy, policy sync failed") @@ -280,13 +280,13 @@ class TestHA(manager_congress.ScenarioPolicyBase): if not test.call_until_true( func=lambda: self._check_resource_missing( self.client, 'datasource'), - duration=60, sleep_for=1): + duration=90, sleep_for=1): raise exceptions.TimeoutException( "primary still has fake dataservice, sync failed") if not test.call_until_true( func=lambda: self._check_resource_missing( self.client, 'policy'), - duration=60, sleep_for=1): + duration=90, sleep_for=1): raise exceptions.TimeoutException( "primary still fake policy, policy synchronizer failed")