File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616from f5 .bigip .tm .sys .failover import InvalidParameterValue
1717from pprint import pprint as pp
1818
19- import time
2019import pytest
20+ import time
2121
2222
2323class 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' ]
You can’t perform that action at this time.
0 commit comments