From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id BD1206EC5B; Tue, 30 Mar 2021 00:46:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BD1206EC5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617054389; bh=NUBbV8YGq3kO1ux5HPtUpRZuOnJYXZ5JpRhTiPN+NkM=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=kDvbURv9mxa0x7cc2ijoPLD4xG27qaUNIN8H5a+wB/f9Qyy7b2OjN9+ii2SYOH2sx q4lHJh44GJEmk1dkwVcvx2toag+SqyncbeFLSNaa47OBoEFK4CU3mjS/GseAvV4ak2 +KAiM0zJf4GmD79vJ0TQQrzuFhbquY4Of3LyZLKg= Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id E76506EC5B for ; Tue, 30 Mar 2021 00:46:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E76506EC5B Received: by mail-lf1-f42.google.com with SMTP id v15so20652427lfq.5 for ; Mon, 29 Mar 2021 14:46:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VLmgqgg5sCu0UOnRb2sJvrG9SxLtrD7nv5OwCg6HILE=; b=IIv7wN4WPGQJXXrouchSkr89n/htQkEZusInwU1RFWxl2wksvVRqkCt4O9yHX0LmGZ dMgaGocZ7+t3osdWilNG6Z5MA91EMQSt90CrAc1lGGDJ9KNSB0AXnDuqvaVHnei5Yqmg 6PmgA0RlXLXiUIz2+M3BiyvFh2oaSZhlbyM40ukvaZR2rxoaRqEqOIKLJXWXuMsAqIDT qjAHaCLSm3cdvMFlY6GOZUWBJIfwYEXRrFdnbKnpHbsGFzbOPMDIRfI9EgH4LKZ3FGMX u1aP290KHAROIAcYSkVhA77yvrdN30EM2+JX5LJZGEo5tJMw6WSCw17/2YNxkLgyIzSh DjXg== X-Gm-Message-State: AOAM533K6nhtRLs4QDGgKMM5DEYx9eAjt8tMuca687inoD7Det4FpxqO 4NQEAve2uhA8PqBcChBHHwyl42BIhnmxsw== X-Google-Smtp-Source: ABdhPJz2a/pMd73QWC1EDSZNkY1m3F8RznClTulYtYJoT650uCH9nbPYkG6DXzwphF7Bez0rpA+2vw== X-Received: by 2002:a05:6512:524:: with SMTP id o4mr18455541lfc.544.1617054387754; Mon, 29 Mar 2021 14:46:27 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id a16sm2574770ljj.124.2021.03.29.14.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 14:46:26 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 4FE525601D4; Tue, 30 Mar 2021 00:46:25 +0300 (MSK) Date: Tue, 30 Mar 2021 00:46:25 +0300 To: Vladislav Shpilevoy Message-ID: References: <20210327111310.37504-1-gorcunov@gmail.com> <20210327111310.37504-3-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.5 (2021-01-21) Subject: Re: [Tarantool-patches] [PATCH v6 2/3] test: add a test for wal_cleanup_delay option X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: tml Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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