Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH 1/1] test: make app-tap/init_script produce less diff
@ 2020-05-01 18:45 Vladislav Shpilevoy
  2020-05-05 16:32 ` Cyrill Gorcunov
  2020-05-15 15:11 ` Kirill Yukhin
  0 siblings, 2 replies; 3+ messages in thread
From: Vladislav Shpilevoy @ 2020-05-01 18:45 UTC (permalink / raw)
  To: tarantool-patches, sergepetrenko, gorcunov

When a new option is added, app-tap/init_script
outputs big diff. Because all options are printed with
ordinal indexes. Addition of a new option changes
indexes of all options after the new one.

The patch removes indexes from the output making diff
smaller, when a new option is added.
---
Branch: http://github.com/tarantool/tarantool/tree/gerold103/app-tap/init_script-test-diff

The patch is motivated by forthcoming option
replication_sync_quorum. When I added, it produced diff about 25
lines in this test. After the patch it becomes 1.

 test/app-tap/init_script.result   | 96 +++++++++++++++----------------
 test/app-tap/init_script.test.lua |  2 +-
 2 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/test/app-tap/init_script.result b/test/app-tap/init_script.result
index 80d4c69fd..7c4454285 100644
--- a/test/app-tap/init_script.result
+++ b/test/app-tap/init_script.result
@@ -3,54 +3,54 @@
 --
 
 box.cfg
-1	background:false
-2	checkpoint_count:2
-3	checkpoint_interval:3600
-4	checkpoint_wal_threshold:1e+18
-5	coredump:false
-6	feedback_enabled:true
-7	feedback_host:https://feedback.tarantool.io
-8	feedback_interval:3600
-9	force_recovery:false
-10	hot_standby:false
-11	listen:port
-12	log:tarantool.log
-13	log_format:plain
-14	log_level:5
-15	memtx_dir:.
-16	memtx_max_tuple_size:1048576
-17	memtx_memory:107374182
-18	memtx_min_tuple_size:16
-19	net_msg_max:768
-20	pid_file:box.pid
-21	read_only:false
-22	readahead:16320
-23	replication_anon:false
-24	replication_connect_timeout:30
-25	replication_skip_conflict:false
-26	replication_sync_lag:10
-27	replication_sync_timeout:300
-28	replication_timeout:1
-29	slab_alloc_factor:1.05
-30	sql_cache_size:5242880
-31	strip_core:true
-32	too_long_threshold:0.5
-33	vinyl_bloom_fpr:0.05
-34	vinyl_cache:134217728
-35	vinyl_dir:.
-36	vinyl_max_tuple_size:1048576
-37	vinyl_memory:134217728
-38	vinyl_page_size:8192
-39	vinyl_read_threads:1
-40	vinyl_run_count_per_level:2
-41	vinyl_run_size_ratio:3.5
-42	vinyl_timeout:60
-43	vinyl_write_threads:4
-44	wal_dir:.
-45	wal_dir_rescan_delay:2
-46	wal_max_size:268435456
-47	wal_mode:write
-48	worker_pool_threads:4
+background:false
+checkpoint_count:2
+checkpoint_interval:3600
+checkpoint_wal_threshold:1e+18
+coredump:false
+feedback_enabled:true
+feedback_host:https://feedback.tarantool.io
+feedback_interval:3600
+force_recovery:false
+hot_standby:false
+listen:port
+log:tarantool.log
+log_format:plain
+log_level:5
+memtx_dir:.
+memtx_max_tuple_size:1048576
+memtx_memory:107374182
+memtx_min_tuple_size:16
+net_msg_max:768
+pid_file:box.pid
+read_only:false
+readahead:16320
+replication_anon:false
+replication_connect_timeout:30
+replication_skip_conflict:false
+replication_sync_lag:10
+replication_sync_timeout:300
+replication_timeout:1
+slab_alloc_factor:1.05
+sql_cache_size:5242880
+strip_core:true
+too_long_threshold:0.5
+vinyl_bloom_fpr:0.05
+vinyl_cache:134217728
+vinyl_dir:.
+vinyl_max_tuple_size:1048576
+vinyl_memory:134217728
+vinyl_page_size:8192
+vinyl_read_threads:1
+vinyl_run_count_per_level:2
+vinyl_run_size_ratio:3.5
+vinyl_timeout:60
+vinyl_write_threads:4
+wal_dir:.
+wal_dir_rescan_delay:2
+wal_max_size:268435456
+wal_mode:write
+worker_pool_threads:4
 --
 -- Test insert from detached fiber
 --
diff --git a/test/app-tap/init_script.test.lua b/test/app-tap/init_script.test.lua
index 155f149a7..e6f298f93 100755
--- a/test/app-tap/init_script.test.lua
+++ b/test/app-tap/init_script.test.lua
@@ -36,7 +36,7 @@ for k,v in pairs(box.cfg) do
 end
 table.sort(t)
 print('box.cfg')
-for k,v in pairs(t) do print(k, v) end
+for k,v in pairs(t) do print(v) end
 --
 -- Insert tests
 --
-- 
2.21.1 (Apple Git-122.3)

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

* Re: [Tarantool-patches] [PATCH 1/1] test: make app-tap/init_script produce less diff
  2020-05-01 18:45 [Tarantool-patches] [PATCH 1/1] test: make app-tap/init_script produce less diff Vladislav Shpilevoy
@ 2020-05-05 16:32 ` Cyrill Gorcunov
  2020-05-15 15:11 ` Kirill Yukhin
  1 sibling, 0 replies; 3+ messages in thread
From: Cyrill Gorcunov @ 2020-05-05 16:32 UTC (permalink / raw)
  To: Vladislav Shpilevoy; +Cc: tarantool-patches

On Fri, May 01, 2020 at 08:45:25PM +0200, Vladislav Shpilevoy wrote:
> When a new option is added, app-tap/init_script
> outputs big diff. Because all options are printed with
> ordinal indexes. Addition of a new option changes
> indexes of all options after the new one.
> 
> The patch removes indexes from the output making diff
> smaller, when a new option is added.
> ---
> Branch: http://github.com/tarantool/tarantool/tree/gerold103/app-tap/init_script-test-diff

Looks ok to me. But I CC SashaT just to make sure.
Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com>

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

* Re: [Tarantool-patches] [PATCH 1/1] test: make app-tap/init_script produce less diff
  2020-05-01 18:45 [Tarantool-patches] [PATCH 1/1] test: make app-tap/init_script produce less diff Vladislav Shpilevoy
  2020-05-05 16:32 ` Cyrill Gorcunov
@ 2020-05-15 15:11 ` Kirill Yukhin
  1 sibling, 0 replies; 3+ messages in thread
From: Kirill Yukhin @ 2020-05-15 15:11 UTC (permalink / raw)
  To: Vladislav Shpilevoy; +Cc: tarantool-patches

Hello,

On 01 май 20:45, Vladislav Shpilevoy wrote:
> When a new option is added, app-tap/init_script
> outputs big diff. Because all options are printed with
> ordinal indexes. Addition of a new option changes
> indexes of all options after the new one.
> 
> The patch removes indexes from the output making diff
> smaller, when a new option is added.
> ---
> Branch: http://github.com/tarantool/tarantool/tree/gerold103/app-tap/init_script-test-diff
> 
> The patch is motivated by forthcoming option
> replication_sync_quorum. When I added, it produced diff about 25
> lines in this test. After the patch it becomes 1.
> 
>  test/app-tap/init_script.result   | 96 +++++++++++++++----------------
>  test/app-tap/init_script.test.lua |  2 +-
>  2 files changed, 49 insertions(+), 49 deletions(-)

LGTM.

I've checked your patch into 1.10, 2.3, 2.4 and master.

--
Regards, Kirill Yukhin

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

end of thread, other threads:[~2020-05-15 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-01 18:45 [Tarantool-patches] [PATCH 1/1] test: make app-tap/init_script produce less diff Vladislav Shpilevoy
2020-05-05 16:32 ` Cyrill Gorcunov
2020-05-15 15:11 ` Kirill Yukhin

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