Skip to content

Commit 05a3d8d

Browse files
committed
Added more functional tests, reworked the helper methods as per discussion with @pjbreaux
1 parent 8ab92e2 commit 05a3d8d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

test/functional/tm/sys/test_failover.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
from f5.bigip.tm.sys.failover import InvalidParameterValue
1717
from pprint import pprint as pp
1818

19-
import time
2019
import pytest
20+
import time
2121

2222

2323
class TestFailover(object):
@@ -64,6 +64,9 @@ def test_exec_cmd(self, bigip):
6464
fl = bigip.sys.failover.load()
6565
assert 'Failover forced_offline' in fl.apiRawValues['apiAnonymous']
6666
f.exec_cmd('run', offline=False, online=True)
67+
# We need this 2 sec delay as sometimes the status does not change
68+
# straight away, causing the assertion to fail.
69+
time.sleep(2)
6770
fl.refresh()
6871
assert 'Failover active' in fl.apiRawValues['apiAnonymous']
6972

@@ -73,8 +76,8 @@ def test_exec_cmd_cmdargs(self, bigip):
7376
fl = bigip.sys.failover.load()
7477
assert 'Failover forced_offline' in fl.apiRawValues['apiAnonymous']
7578
f.exec_cmd('run', utilCmdArgs='online')
76-
# We need this 1 sec delay as sometimes the status does not change
79+
# We need this 2 sec delay as sometimes the status does not change
7780
# straight away, causing the assertion to fail.
78-
time.sleep(1)
81+
time.sleep(2)
7982
fl.refresh()
8083
assert 'Failover active' in fl.apiRawValues['apiAnonymous']

0 commit comments

Comments
 (0)