Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH 1/1] tests: fix replication/prune.test.lua hang
@ 2020-09-18 22:21 Vladislav Shpilevoy
  2020-09-19  7:08 ` Alexander V. Tikhonov
  0 siblings, 1 reply; 3+ messages in thread
From: Vladislav Shpilevoy @ 2020-09-18 22:21 UTC (permalink / raw)
  To: tarantool-patches, avtikhon

The test tried to start a replica whose box.cfg would hang, with
replication_connect_quorum = 0 to make it return immediately.

But the quorum parameter was added and removed during work on
444213178c6260d6adfd640f7e4a0c5e6f8f2458 ("replication: do not
register outgoing connections"). Instead, to start the replica
without blocking on box.cfg it is necessary to pass 'wait=False'
with the test_run:cmd('start server') command.

Closes #5311
---
Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5311-prune-hangs
Issue: https://github.com/tarantool/tarantool/issues/5311

 test/replication/prune.result   | 2 +-
 test/replication/prune.test.lua | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/replication/prune.result b/test/replication/prune.result
index 67fd62990..e25e9684e 100644
--- a/test/replication/prune.result
+++ b/test/replication/prune.result
@@ -137,7 +137,7 @@ test_run:cmd('stop server replica1')
 ---
 - true
 ...
-test_run:cmd('start server replica1 with args="true 0"')
+test_run:cmd('start server replica1 with args="true", wait=False')
 ---
 - true
 ...
diff --git a/test/replication/prune.test.lua b/test/replication/prune.test.lua
index ea8b0b3c3..68300b270 100644
--- a/test/replication/prune.test.lua
+++ b/test/replication/prune.test.lua
@@ -66,7 +66,7 @@ test_run:cmd('eval replica1 "box.info.replication[1].upstream.message"')
 
 -- restart replica and check that replica isn't able to join to cluster
 test_run:cmd('stop server replica1')
-test_run:cmd('start server replica1 with args="true 0"')
+test_run:cmd('start server replica1 with args="true", wait=False')
 test_run:cmd('switch replica1')
 test_run:wait_upstream(1, {message_re = "Can't subscribe non%-anonymous replica"})
 test_run:cmd('switch default')
-- 
2.21.1 (Apple Git-122.3)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Tarantool-patches] [PATCH 1/1] tests: fix replication/prune.test.lua hang
  2020-09-18 22:21 [Tarantool-patches] [PATCH 1/1] tests: fix replication/prune.test.lua hang Vladislav Shpilevoy
@ 2020-09-19  7:08 ` Alexander V. Tikhonov
  2020-09-19 13:08   ` Vladislav Shpilevoy
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander V. Tikhonov @ 2020-09-19  7:08 UTC (permalink / raw)
  To: Vladislav Shpilevoy; +Cc: tarantool-patches

Hi Vlad, thanks for the fast fix. I've checked it and the issue
seems completele fixed, also commit testing passed:
https://gitlab.com/tarantool/tarantool/-/jobs/746376811#L4654
The patch LGTM.

On Sat, Sep 19, 2020 at 12:21:47AM +0200, Vladislav Shpilevoy wrote:
> The test tried to start a replica whose box.cfg would hang, with
> replication_connect_quorum = 0 to make it return immediately.
> 
> But the quorum parameter was added and removed during work on
> 444213178c6260d6adfd640f7e4a0c5e6f8f2458 ("replication: do not
> register outgoing connections"). Instead, to start the replica
> without blocking on box.cfg it is necessary to pass 'wait=False'
> with the test_run:cmd('start server') command.
> 
> Closes #5311
> ---
> Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5311-prune-hangs
> Issue: https://github.com/tarantool/tarantool/issues/5311
> 
>  test/replication/prune.result   | 2 +-
>  test/replication/prune.test.lua | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/test/replication/prune.result b/test/replication/prune.result
> index 67fd62990..e25e9684e 100644
> --- a/test/replication/prune.result
> +++ b/test/replication/prune.result
> @@ -137,7 +137,7 @@ test_run:cmd('stop server replica1')
>  ---
>  - true
>  ...
> -test_run:cmd('start server replica1 with args="true 0"')
> +test_run:cmd('start server replica1 with args="true", wait=False')
>  ---
>  - true
>  ...
> diff --git a/test/replication/prune.test.lua b/test/replication/prune.test.lua
> index ea8b0b3c3..68300b270 100644
> --- a/test/replication/prune.test.lua
> +++ b/test/replication/prune.test.lua
> @@ -66,7 +66,7 @@ test_run:cmd('eval replica1 "box.info.replication[1].upstream.message"')
>  
>  -- restart replica and check that replica isn't able to join to cluster
>  test_run:cmd('stop server replica1')
> -test_run:cmd('start server replica1 with args="true 0"')
> +test_run:cmd('start server replica1 with args="true", wait=False')
>  test_run:cmd('switch replica1')
>  test_run:wait_upstream(1, {message_re = "Can't subscribe non%-anonymous replica"})
>  test_run:cmd('switch default')
> -- 
> 2.21.1 (Apple Git-122.3)
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Tarantool-patches] [PATCH 1/1] tests: fix replication/prune.test.lua hang
  2020-09-19  7:08 ` Alexander V. Tikhonov
@ 2020-09-19 13:08   ` Vladislav Shpilevoy
  0 siblings, 0 replies; 3+ messages in thread
From: Vladislav Shpilevoy @ 2020-09-19 13:08 UTC (permalink / raw)
  To: Alexander V. Tikhonov; +Cc: tarantool-patches

Pushed to master, 2.5, and 2.4.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-19 13:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 22:21 [Tarantool-patches] [PATCH 1/1] tests: fix replication/prune.test.lua hang Vladislav Shpilevoy
2020-09-19  7:08 ` Alexander V. Tikhonov
2020-09-19 13:08   ` Vladislav Shpilevoy

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