* [Tarantool-patches] [PATCH v1] test: flaky replication/gh-3642-misc-* test
@ 2020-09-07 6:48 Alexander V. Tikhonov
2020-09-09 15:41 ` Serge Petrenko
0 siblings, 1 reply; 2+ messages in thread
From: Alexander V. Tikhonov @ 2020-09-07 6:48 UTC (permalink / raw)
To: Kirill Yukhin, Serge Petrenko; +Cc: tarantool-patches
On heavy loaded hosts found the following issue:
[036] --- replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.result Sun Sep 6 23:49:57 2020
[036] +++ replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.reject Mon Sep 7 04:07:06 2020
[036] @@ -63,7 +63,7 @@
[036] ...
[036] box.info.replication[1].upstream.status
[036] ---
[036] -- follow
[036] +- disconnected
[036] ...
[036] test_run:cmd('switch default')
[036] ---
It happened because replication upstream status check occurred too
early, when it was only in 'disconnected' state. To give the
replication status check routine ability to reach the needed 'follow'
state, it need to wait for it using test_run:wait_upstream() routine.
Closes #5276
---
Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4940-replication-misc
Issue: https://github.com/tarantool/tarantool/issues/5276
.../gh-3642-misc-no-socket-leak-on-replica-disconnect.result | 4 ++--
...gh-3642-misc-no-socket-leak-on-replica-disconnect.test.lua | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.result b/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.result
index d068ad8fc..e2adb3bc3 100644
--- a/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.result
+++ b/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.result
@@ -61,9 +61,9 @@ test_run:cmd("setopt delimiter ''");
---
- true
...
-box.info.replication[1].upstream.status
+test_run:wait_upstream(1, {status = 'follow'})
---
-- follow
+- true
...
test_run:cmd('switch default')
---
diff --git a/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.test.lua b/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.test.lua
index 9cfbe7214..ac26aa314 100644
--- a/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.test.lua
+++ b/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.test.lua
@@ -28,7 +28,7 @@ for i = 1, 64 do
end;
test_run:cmd("setopt delimiter ''");
-box.info.replication[1].upstream.status
+test_run:wait_upstream(1, {status = 'follow'})
test_run:cmd('switch default')
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Tarantool-patches] [PATCH v1] test: flaky replication/gh-3642-misc-* test
2020-09-07 6:48 [Tarantool-patches] [PATCH v1] test: flaky replication/gh-3642-misc-* test Alexander V. Tikhonov
@ 2020-09-09 15:41 ` Serge Petrenko
0 siblings, 0 replies; 2+ messages in thread
From: Serge Petrenko @ 2020-09-09 15:41 UTC (permalink / raw)
To: Alexander V. Tikhonov, Kirill Yukhin; +Cc: tarantool-patches
07.09.2020 09:48, Alexander V. Tikhonov пишет:
> On heavy loaded hosts found the following issue:
>
> [036] --- replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.result Sun Sep 6 23:49:57 2020
> [036] +++ replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.reject Mon Sep 7 04:07:06 2020
> [036] @@ -63,7 +63,7 @@
> [036] ...
> [036] box.info.replication[1].upstream.status
> [036] ---
> [036] -- follow
> [036] +- disconnected
> [036] ...
> [036] test_run:cmd('switch default')
> [036] ---
>
> It happened because replication upstream status check occurred too
> early, when it was only in 'disconnected' state. To give the
> replication status check routine ability to reach the needed 'follow'
> state, it need to wait for it using test_run:wait_upstream() routine.
>
> Closes #5276
> ---
>
> Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4940-replication-misc
> Issue: https://github.com/tarantool/tarantool/issues/5276
>
> .../gh-3642-misc-no-socket-leak-on-replica-disconnect.result | 4 ++--
> ...gh-3642-misc-no-socket-leak-on-replica-disconnect.test.lua | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.result b/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.result
> index d068ad8fc..e2adb3bc3 100644
> --- a/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.result
> +++ b/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.result
> @@ -61,9 +61,9 @@ test_run:cmd("setopt delimiter ''");
> ---
> - true
> ...
> -box.info.replication[1].upstream.status
> +test_run:wait_upstream(1, {status = 'follow'})
> ---
> -- follow
> +- true
> ...
> test_run:cmd('switch default')
> ---
> diff --git a/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.test.lua b/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.test.lua
> index 9cfbe7214..ac26aa314 100644
> --- a/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.test.lua
> +++ b/test/replication/gh-3642-misc-no-socket-leak-on-replica-disconnect.test.lua
> @@ -28,7 +28,7 @@ for i = 1, 64 do
> end;
> test_run:cmd("setopt delimiter ''");
>
> -box.info.replication[1].upstream.status
> +test_run:wait_upstream(1, {status = 'follow'})
>
> test_run:cmd('switch default')
>
LGTM
--
Serge Petrenko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-09 15:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-07 6:48 [Tarantool-patches] [PATCH v1] test: flaky replication/gh-3642-misc-* test Alexander V. Tikhonov
2020-09-09 15:41 ` Serge Petrenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox