diff options
| author | Oleg Fayans <ofayans@redhat.com> | 2016-08-26 14:36:23 +0200 |
|---|---|---|
| committer | Martin Basti <mbasti@redhat.com> | 2016-08-26 16:14:37 +0200 |
| commit | 9dffe55e6582bca7b1a4b8ad3042c63c5ccde51a (patch) | |
| tree | c6df4720ce956f21570a2f7127c003b4063ecc2a | |
| parent | 48aaf2bbf5df6dcedaa466753c8fafb478cb31b2 (diff) | |
Added a sleep interval after domainlevel raise in tests
Due to race conditions the test sometimes catches 2 one-way segments instead of
one bidirectional. We need to give the master time to merge the one-way
segments before we test the output.
https://fedorahosted.org/freeipa/ticket/6265
Reviewed-By: Martin Basti <mbasti@redhat.com>
| -rw-r--r-- | ipatests/test_integration/test_replica_promotion.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py index 497dad5bf..3e62f9252 100644 --- a/ipatests/test_integration/test_replica_promotion.py +++ b/ipatests/test_integration/test_replica_promotion.py @@ -2,6 +2,7 @@ # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # +import time from ipatests.test_integration.base import IntegrationTest from ipatests.test_integration import tasks from ipatests.test_integration.tasks import assert_error @@ -63,7 +64,9 @@ class TestReplicaPromotionLevel0(ReplicaPromotionBase): command = ["ipa", "topologysegment-find", DOMAIN_SUFFIX_NAME] tasks.install_replica(self.master, self.replicas[0]) backup_file = tasks.ipa_backup(self.master) - self.master.run_command(["ipa", "domainlevel-set", "1"]) + self.master.run_command(["ipa", "domainlevel-set", str(DOMAIN_LEVEL_1)]) + # We need to give the server time to merge 2 one-way segments into one + time.sleep(10) result = self.master.run_command(command) found1 = result.stdout_text.rfind("1 segment matched") assert(found1 > 0), result.stdout_text |
