Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] test: merge possilbe failed test outputs for election_qsync
@ 2020-10-12 12:09 Serge Petrenko
  2020-10-13 13:09 ` Alexander V. Tikhonov
  0 siblings, 1 reply; 2+ messages in thread
From: Serge Petrenko @ 2020-10-12 12:09 UTC (permalink / raw)
  To: avtikhon; +Cc: tarantool-patches

Instead of having all possible 2^10 diffs in case select{} fails,
log the select{} output in case the space contains less than 10
elements.
Requested by @avtikhon for easier flaky test handling.

Related to #5395
---
https://github.com/tarantool/tarantool/issues/5395
https://github.com/tarantool/tarantool/tree/sp/gh-5395-minimize-test-output

 test/replication/election_qsync.result   | 15 +++------------
 test/replication/election_qsync.test.lua |  2 +-
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/test/replication/election_qsync.result b/test/replication/election_qsync.result
index 9497b37bf..09a76c51c 100644
--- a/test/replication/election_qsync.result
+++ b/test/replication/election_qsync.result
@@ -109,18 +109,9 @@ test_run:cmd('setopt delimiter ""');
  | - true
  | ...
 -- We're connected to some leader.
-c.space.test:select{}
- | ---
- | - - [1]
- |   - [2]
- |   - [3]
- |   - [4]
- |   - [5]
- |   - [6]
- |   - [7]
- |   - [8]
- |   - [9]
- |   - [10]
+#c.space.test:select{} == 10 or require('log').error(c.space.test:select{})
+ | ---
+ | - true
  | ...
 
 test_run:drop_cluster(SERVERS)
diff --git a/test/replication/election_qsync.test.lua b/test/replication/election_qsync.test.lua
index bca1b20c7..f84ca8440 100644
--- a/test/replication/election_qsync.test.lua
+++ b/test/replication/election_qsync.test.lua
@@ -68,6 +68,6 @@ for i = 1,10 do
 end;
 test_run:cmd('setopt delimiter ""');
 -- We're connected to some leader.
-c.space.test:select{}
+#c.space.test:select{} == 10 or require('log').error(c.space.test:select{})
 
 test_run:drop_cluster(SERVERS)
-- 
2.24.3 (Apple Git-128)

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

* Re: [Tarantool-patches] [PATCH] test: merge possilbe failed test outputs for election_qsync
  2020-10-12 12:09 [Tarantool-patches] [PATCH] test: merge possilbe failed test outputs for election_qsync Serge Petrenko
@ 2020-10-13 13:09 ` Alexander V. Tikhonov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander V. Tikhonov @ 2020-10-13 13:09 UTC (permalink / raw)
  To: Serge Petrenko; +Cc: tarantool-patches

Hi Sergey, thanks for the fast fix. I've checked the patch and it helped
to use checksums on fails of this test. Patch LGTM.

On Mon, Oct 12, 2020 at 03:09:04PM +0300, Serge Petrenko wrote:
> Instead of having all possible 2^10 diffs in case select{} fails,
> log the select{} output in case the space contains less than 10
> elements.
> Requested by @avtikhon for easier flaky test handling.
> 
> Related to #5395
> ---
> https://github.com/tarantool/tarantool/issues/5395
> https://github.com/tarantool/tarantool/tree/sp/gh-5395-minimize-test-output
> 
>  test/replication/election_qsync.result   | 15 +++------------
>  test/replication/election_qsync.test.lua |  2 +-
>  2 files changed, 4 insertions(+), 13 deletions(-)
> 
> diff --git a/test/replication/election_qsync.result b/test/replication/election_qsync.result
> index 9497b37bf..09a76c51c 100644
> --- a/test/replication/election_qsync.result
> +++ b/test/replication/election_qsync.result
> @@ -109,18 +109,9 @@ test_run:cmd('setopt delimiter ""');
>   | - true
>   | ...
>  -- We're connected to some leader.
> -c.space.test:select{}
> - | ---
> - | - - [1]
> - |   - [2]
> - |   - [3]
> - |   - [4]
> - |   - [5]
> - |   - [6]
> - |   - [7]
> - |   - [8]
> - |   - [9]
> - |   - [10]
> +#c.space.test:select{} == 10 or require('log').error(c.space.test:select{})
> + | ---
> + | - true
>   | ...
>  
>  test_run:drop_cluster(SERVERS)
> diff --git a/test/replication/election_qsync.test.lua b/test/replication/election_qsync.test.lua
> index bca1b20c7..f84ca8440 100644
> --- a/test/replication/election_qsync.test.lua
> +++ b/test/replication/election_qsync.test.lua
> @@ -68,6 +68,6 @@ for i = 1,10 do
>  end;
>  test_run:cmd('setopt delimiter ""');
>  -- We're connected to some leader.
> -c.space.test:select{}
> +#c.space.test:select{} == 10 or require('log').error(c.space.test:select{})
>  
>  test_run:drop_cluster(SERVERS)
> -- 
> 2.24.3 (Apple Git-128)
> 

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 12:09 [Tarantool-patches] [PATCH] test: merge possilbe failed test outputs for election_qsync Serge Petrenko
2020-10-13 13:09 ` 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