Skip to content
Snippets Groups Projects
Commit 206603ce authored by Vladimir Davydov's avatar Vladimir Davydov
Browse files

test: fix sporadic box/net.box failure

From time to time box/net.box test fails like this:

  Test failed! Result content mismatch:
  --- box/net.box.result	Sat Aug 25 18:41:35 2018
  +++ box/net.box.reject	Sat Aug 25 18:49:17 2018
  @@ -2150,7 +2150,7 @@
   ...
   disconnected -- false
   ---
  -- false
  +- true
   ...
   ch2:put(true)
   ---

The 'disconnected' variable is changed from false to true by
box.session.on_disconnect trigger. If there happens to be a
dangling connection that wasn't explicitly closed, it might
occur that the Lua garbage collector closes it, which will
result in spurious trigger execution and test failure.

Fix this by collecting all dangling connections before installing
the trigger.
parent b4b40411
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment