diff options
author | Ilya Maximets <i.maximets@samsung.com> | 2019-01-09 20:30:16 +0300 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-01-10 15:39:48 -0800 |
commit | 77f42ca53581089a15ede670f0be6b6203360491 (patch) | |
tree | ddba6bb6ed2f52751d44e021c6e552dbfee6bf75 /tests/test-ovsdb.py | |
parent | 747652d23e4261f5e526851c958dbec9c8f19a7e (diff) | |
download | openvswitch-77f42ca53581089a15ede670f0be6b6203360491.tar.gz |
stream: Allow timeout configuration for open_block.
On some systems in case where remote is not responding, socket could
remain in SYN_SENT state for a really long time without errors waiting
for connection. This leads to situations where open_blok() hangs for
a few minutes waiting for connection to the DOWN remote.
For example, our "multiple remotes" idl tests hangs waiting for
connection to the WRONG_PORT on FreeBSD in CirrusCI environment.
This leads to test failures because Alarm signal arrives much faster
than ETIMEDOUT from the socket.
This patch allowes to specify timeout value for 'open_block' function.
If the connection takes more time, socket will be closed with
ETIMEDOUT error code. Negative value or None in python could be
used to wait infinitely.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests/test-ovsdb.py')
-rw-r--r-- | tests/test-ovsdb.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py index c03476c7f..2d1112ddd 100644 --- a/tests/test-ovsdb.py +++ b/tests/test-ovsdb.py @@ -604,7 +604,7 @@ def do_idl(schema_file, remote, *commands): stream = None for r in remotes: error, stream = ovs.stream.Stream.open_block( - ovs.stream.Stream.open(r)) + ovs.stream.Stream.open(r), 2000) if not error and stream: break stream = None |