[Tarantool-patches] [PATCH v2] test: fix flaky socket test
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sun Dec 8 18:55:38 MSK 2019
Thanks for the fixes!
See 2 comments below.
> diff --git a/test/app/socket.result b/test/app/socket.result
> index fd299424c96..0095b89b867 100644
> --- a/test/app/socket.result
> +++ b/test/app/socket.result
> @@ -107,7 +110,7 @@ s:nonblock(true)
> ---
> - true
> ...
> -s:readable(.1)
> +s:readable(WAIT_TCP_CONNECT_TIME)
1. How did you choose exactly these places to patch?
I see some other places, which also wait for an event,
but they still use a small timeout (in comparison with
240 secs). For example:
socket.result line 233, 904, 919:
s:readable(1)
---
- true
...
socket.result line 836, 848:
s:readable(10)
---
- true
...
socket.result line 2870:
s:settimeout(1)
receive2 = s:receive('*a')
Here :receive() has timeout 1 sec,
not infinity.
> @@ -754,7 +757,7 @@ string.match(tostring(sc), ', peer') == nil
> ---
> - true
> ...
> -sc:writable()
> +sc:writable(WAIT_TCP_CONNECT_TIME)
2. Here the timeout was infinity, but you
changed it to your constant. Is it to make
all the places consistent? That is strange,
because there are still other places calling
writable() without arguments or a settimeout()
invoked beforehand.
More information about the Tarantool-patches
mailing list