Tarantool development patches archive
 help / color / mirror / Atom feed
From: Cyrill Gorcunov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v6 2/3] test: add a test for wal_cleanup_delay option
Date: Tue, 30 Mar 2021 00:46:25 +0300	[thread overview]
Message-ID: <YGJKsVcaLEM3tYn6@grain> (raw)
In-Reply-To: <d01a3f46-b352-517b-df63-0ae662a8429f@tarantool.org>

On Mon, Mar 29, 2021 at 11:07:29PM +0200, Vladislav Shpilevoy wrote:
> 
> 2. Do you know that boolean expressions don't need to be compared
> with the boolean constants explicitly? You could write
> 
> 	assert(box.info.gc().is_paused).
> 
> The same in all the other similar places in this file. Especially
> where you do '== false' which is super confusing.

Force pushed an update, is that what you've in mind?
---
 test/replication/gh-5806-xlog-cleanup.result   | 12 ++++++------
 test/replication/gh-5806-xlog-cleanup.test.lua | 12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/test/replication/gh-5806-xlog-cleanup.result b/test/replication/gh-5806-xlog-cleanup.result
index da09daf17..412e8f02d 100644
--- a/test/replication/gh-5806-xlog-cleanup.result
+++ b/test/replication/gh-5806-xlog-cleanup.result
@@ -298,7 +298,7 @@ box.snapshot()
  | ---
  | - ok
  | ...
-assert(box.info.gc().is_paused == true)
+assert(box.info.gc().is_paused)
  | ---
  | - true
  | ...
@@ -400,7 +400,7 @@ test_run:cmd('delete server replica')
 
 test_run:cmd('restart server master with args="3600"')
  | 
-assert(box.info.gc().is_paused == true)
+assert(box.info.gc().is_paused)
  | ---
  | - true
  | ...
@@ -480,14 +480,14 @@ master_uuid = test_run:eval('master', 'return box.info.uuid')[1]
 replica_uuid = test_run:eval('replica', 'return box.info.uuid')[1]
  | ---
  | ...
-master_custer = test_run:eval('master', 'return box.space._cluster:select()')[1]
+master_cluster = test_run:eval('master', 'return box.space._cluster:select()')[1]
  | ---
  | ...
-assert(master_custer[1][2] == master_uuid)
+assert(master_cluster[1][2] == master_uuid)
  | ---
  | - true
  | ...
-assert(master_custer[2][2] == replica_uuid)
+assert(master_cluster[2][2] == replica_uuid)
  | ---
  | - true
  | ...
@@ -511,7 +511,7 @@ test_run:switch('master')
  | ...
 test_run:cmd('restart server master with args="3600"')
  | 
-assert(box.info.gc().is_paused == true)
+assert(box.info.gc().is_paused)
  | ---
  | - true
  | ...
diff --git a/test/replication/gh-5806-xlog-cleanup.test.lua b/test/replication/gh-5806-xlog-cleanup.test.lua
index b65563e7f..5af98d362 100644
--- a/test/replication/gh-5806-xlog-cleanup.test.lua
+++ b/test/replication/gh-5806-xlog-cleanup.test.lua
@@ -137,7 +137,7 @@ box.snapshot()
 test_run:cmd('restart server master with args="3600"')
 box.space.test:insert({2})
 box.snapshot()
-assert(box.info.gc().is_paused == true)
+assert(box.info.gc().is_paused)
 
 test_run:cmd('start server replica')
 
@@ -176,7 +176,7 @@ test_run:cmd('cleanup server replica')
 test_run:cmd('delete server replica')
 
 test_run:cmd('restart server master with args="3600"')
-assert(box.info.gc().is_paused == true)
+assert(box.info.gc().is_paused)
 
 test_run:switch('master')
 box.cfg{wal_cleanup_delay = 0.01}
@@ -206,9 +206,9 @@ test_run:cmd('start server replica')
 test_run:switch('default')
 master_uuid = test_run:eval('master', 'return box.info.uuid')[1]
 replica_uuid = test_run:eval('replica', 'return box.info.uuid')[1]
-master_custer = test_run:eval('master', 'return box.space._cluster:select()')[1]
-assert(master_custer[1][2] == master_uuid)
-assert(master_custer[2][2] == replica_uuid)
+master_cluster = test_run:eval('master', 'return box.space._cluster:select()')[1]
+assert(master_cluster[1][2] == master_uuid)
+assert(master_cluster[2][2] == replica_uuid)
 
 test_run:cmd('stop server replica')
 test_run:cmd('cleanup server replica')
@@ -216,7 +216,7 @@ test_run:cmd('delete server replica')
 
 test_run:switch('master')
 test_run:cmd('restart server master with args="3600"')
-assert(box.info.gc().is_paused == true)
+assert(box.info.gc().is_paused)
 
 --
 -- Drop the replica from _cluster and make sure
-- 
2.30.2


  reply	other threads:[~2021-03-29 21:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-27 11:13 [Tarantool-patches] [PATCH v6 0/3] gc/xlog: delay xlog cleanup until relays are subscribed Cyrill Gorcunov via Tarantool-patches
2021-03-27 11:13 ` [Tarantool-patches] [PATCH v6 1/3] " Cyrill Gorcunov via Tarantool-patches
2021-03-27 11:13 ` [Tarantool-patches] [PATCH v6 2/3] test: add a test for wal_cleanup_delay option Cyrill Gorcunov via Tarantool-patches
2021-03-29 21:07   ` Vladislav Shpilevoy via Tarantool-patches
2021-03-29 21:46     ` Cyrill Gorcunov via Tarantool-patches [this message]
2021-03-29 21:54       ` Vladislav Shpilevoy via Tarantool-patches
2021-03-29 21:57         ` Cyrill Gorcunov via Tarantool-patches
2021-03-29 22:19           ` Vladislav Shpilevoy via Tarantool-patches
2021-03-29 22:40             ` Cyrill Gorcunov via Tarantool-patches
2021-03-29 22:56               ` Vladislav Shpilevoy via Tarantool-patches
2021-03-30  7:19                 ` Cyrill Gorcunov via Tarantool-patches
2021-03-30 11:55                   ` Cyrill Gorcunov via Tarantool-patches
2021-03-30 19:59                   ` Vladislav Shpilevoy via Tarantool-patches
2021-03-27 11:13 ` [Tarantool-patches] [PATCH v6 3/3] test: box-tap/gc -- add test for is_paused field Cyrill Gorcunov via Tarantool-patches
2021-03-30 19:57 ` [Tarantool-patches] [PATCH v6 0/3] gc/xlog: delay xlog cleanup until relays are subscribed Vladislav Shpilevoy via Tarantool-patches
2021-03-31  8:28 ` Kirill Yukhin via Tarantool-patches

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=YGJKsVcaLEM3tYn6@grain \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v6 2/3] test: add a test for wal_cleanup_delay option' \
    /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