* [PATCH v1] test: app/socket flaky fails at 1951 line
@ 2019-08-16 6:15 Alexander V. Tikhonov
0 siblings, 0 replies; only message in thread
From: Alexander V. Tikhonov @ 2019-08-16 6:15 UTC (permalink / raw)
To: Vladimir Davydov; +Cc: Alexander V. Tikhonov, tarantool-patches
Found that subtest for lua socket emulation on high
loaded hosts closes the socket channel faster than
write channel on finishes:
wch:put("Fu")
c:send("354 Please type your message\n")
sc:close()
It produces the following fail:
[015] --- app/socket.result Thu Aug 15 02:55:31 2019
[015] +++ app/socket.reject Thu Aug 15 02:56:55 2019
[015] @@ -1951,8 +1951,7 @@
[015] c:receive("*l", "Line: ")
[015] ---
[015] - null
[015] -- closed
[015] -- 'Line: Fu'
[015] +- Connection reset by peer
[015] ...
[015] c:receive()
[015] ---
To fix it we need some time delay before the closing
routine call:
wch:put("Fu")
c:send("354 Please type your message\n")
fiber.sleep(.1)
sc:close()
Fixes #4426
---
Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4426-app-socket-1951
Issue: https://github.com/tarantool/tarantool/issues/4426
test/app/socket.result | 3 +++
test/app/socket.test.lua | 1 +
2 files changed, 4 insertions(+)
diff --git a/test/app/socket.result b/test/app/socket.result
index fd299424c..52b1ae3cb 100644
--- a/test/app/socket.result
+++ b/test/app/socket.result
@@ -1944,6 +1944,9 @@ c:send("354 Please type your message\n")
---
- 29
...
+fiber.sleep(.1)
+---
+...
sc:close()
---
- 1
diff --git a/test/app/socket.test.lua b/test/app/socket.test.lua
index c72d41763..785a0b757 100644
--- a/test/app/socket.test.lua
+++ b/test/app/socket.test.lua
@@ -653,6 +653,7 @@ c:receive(4)
c:receive("*l")
wch:put("Fu")
c:send("354 Please type your message\n")
+fiber.sleep(.1)
sc:close()
c:receive("*l", "Line: ")
c:receive()
--
2.17.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-16 6:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 6:15 [PATCH v1] test: app/socket flaky fails at 1951 line Alexander V. Tikhonov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox