aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_cli.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-12-02 13:40:33 -0500
committerOle Trøan <otroan@employees.org>2019-12-03 09:28:18 +0000
commite2ccdf0316243a1486109743e3de532cae5f3254 (patch)
tree1a61a326f02ce75f2eb4840e2726c5f0b141bff7 /test/test_cli.py
parent5d440d9cb6a51c6658f4be855008b91f05d294c6 (diff)
papi: add a per-call _timeout option
add the ability to override the default timeout value on a per-call basis. Use: rv = self.vapi.papi.cli_inband(cmd='wait 10', _timeout=15) Type: feature Change-Id: Ia90a58586a1f63e02118599a2a4b7141e5a0b90d Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/test_cli.py')
-rw-r--r--test/test_cli.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_cli.py b/test/test_cli.py
index 7fa734b2231..a1ffbac81d8 100644
--- a/test/test_cli.py
+++ b/test/test_cli.py
@@ -17,7 +17,7 @@ class TestCLI(VppTestCase):
@classmethod
def setUpClass(cls):
# using the framework default
- # cls.vapi_response_timeout = 5
+ cls.vapi_response_timeout = 5
super(TestCLI, cls).setUpClass()
@classmethod
@@ -44,6 +44,11 @@ class TestCLI(VppTestCase):
vpp_transport_shmem.VppTransportShmemIOError) as ctx:
rv = self.vapi.papi.cli_inband(cmd='wait 10')
+ def test_long_cli_delay_override(self):
+ """ Test per-command _timeout option.""" # noqa
+ rv = self.vapi.papi.cli_inband(cmd='wait 10', _timeout=15)
+ self.assertEqual(rv.retval, 0)
+
class TestCLIExtendedVapiTimeout(VppTestCase):
maxDiff = None