Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: tarantool-patches@freelists.org
Subject: Re: [PATCH] test: fix box/push.test sporadic hang
Date: Thu, 28 Feb 2019 14:10:57 +0300	[thread overview]
Message-ID: <20190228111057.qcxprosntfbl5rd7@esperanza> (raw)
In-Reply-To: <ae7cc3e977f927ad00dc395c0332583395a6c9a6.1551351271.git.vdavydov.dev@gmail.com>

On Thu, Feb 28, 2019 at 02:05:05PM +0300, Vladimir Davydov wrote:
> This patch fixes the following test failure:
> 
>  | --- box/push.result	Thu Jan 24 13:10:04 2019
>  | +++ var/001_box/push.result	Thu Jan 24 13:13:08 2019
>  | @@ -536,17 +536,3 @@
>  |  ---
>  |  ...
>  |  chan_disconnected:get()
>  | ----
>  | -- true
>  | -...
>  | -chan_push:put(true)
>  | ----
>  | -- true
>  | -...
>  | -chan_push:get()
>  | ----
>  | -- Session is closed
>  | -...
>  | -box.schema.func.drop('do_long_and_push')
>  | ----
>  | -...
> 
> The problem occurs because the main fiber may close the connection
> before do_long_and_push sets the session.on_disconnect trigger, in
> which case chan_disconnected:get() will never return. Fix this by
> setting the trigger in the main fiber and adding another channel
> to wait for do_long_and_push function to start. Also, don't forget
> to clear the trigger once the test is complete.
> 
> Fixes commit 43af2de2b129 ("session: outdate a session of a closed
> connection").
> 
> Closes #3947
> ---
> https://github.com/tarantool/tarantool/issues/3947
> https://github.com/tarantool/tarantool/commits/dv/test-fixes
> 
>  test/box/push.result   | 15 ++++++++++++++-
>  test/box/push.test.lua |  6 +++++-
>  2 files changed, 19 insertions(+), 2 deletions(-)

Pushed to 2.1 and 1.10.

      reply	other threads:[~2019-02-28 11:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 11:05 Vladimir Davydov
2019-02-28 11:10 ` Vladimir Davydov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190228111057.qcxprosntfbl5rd7@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH] test: fix box/push.test sporadic hang' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox