From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: tarantool-patches@dev.tarantool.org, olegrok@tarantool.org, yaroslav.dynnikov@tarantool.org Subject: [Tarantool-patches] [PATCH 1/2] test: fix test output on latest Tarantool Date: Thu, 13 May 2021 13:07:05 +0200 [thread overview] Message-ID: <b580c9081e63a83d39adfabac17b5052de549292.1620903962.git.v.shpilevoy@tarantool.org> (raw) In-Reply-To: <cover.1620903962.git.v.shpilevoy@tarantool.org> Duplicate key error at insertion into a space on the latest Tarantool changed its message and it broke of the tests. The patch updates the test so it checks only the needed part of the message and does not depend on Tarantool version anymore. --- test/storage/storage.result | 8 +++++--- test/storage/storage.test.lua | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/storage/storage.result b/test/storage/storage.result index 2c9784a..d18b7f8 100644 --- a/test/storage/storage.result +++ b/test/storage/storage.result @@ -179,10 +179,12 @@ vshard.storage.buckets_info() status: active id: 1 ... -vshard.storage.bucket_force_create(1) -- error +ok, err = vshard.storage.bucket_force_create(1) --- -- null -- Duplicate key exists in unique index 'pk' in space '_bucket' +... +assert(not ok and err.message:match("Duplicate key exists")) +--- +- Duplicate key exists ... vshard.storage.bucket_force_drop(1) --- diff --git a/test/storage/storage.test.lua b/test/storage/storage.test.lua index 33f0498..97558f6 100644 --- a/test/storage/storage.test.lua +++ b/test/storage/storage.test.lua @@ -56,7 +56,8 @@ vshard.storage.sync(100500) vshard.storage.buckets_info() vshard.storage.bucket_force_create(1) vshard.storage.buckets_info() -vshard.storage.bucket_force_create(1) -- error +ok, err = vshard.storage.bucket_force_create(1) +assert(not ok and err.message:match("Duplicate key exists")) vshard.storage.bucket_force_drop(1) vshard.storage.buckets_info() -- 2.24.3 (Apple Git-128)
next prev parent reply other threads:[~2021-05-13 11:07 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-13 11:07 [Tarantool-patches] [PATCH 0/2] vshard.storage.buckets_count() bug Vladislav Shpilevoy via Tarantool-patches 2021-05-13 11:07 ` Vladislav Shpilevoy via Tarantool-patches [this message] 2021-05-13 20:23 ` [Tarantool-patches] [PATCH 1/2] test: fix test output on latest Tarantool Oleg Babin via Tarantool-patches 2021-05-19 21:50 ` Yaroslav Dynnikov via Tarantool-patches 2021-05-21 19:26 ` Vladislav Shpilevoy via Tarantool-patches 2021-05-21 21:54 ` Yaroslav Dynnikov via Tarantool-patches 2021-05-13 11:07 ` [Tarantool-patches] [PATCH 2/2] vshard: fix buckets_count() on replicas Vladislav Shpilevoy via Tarantool-patches 2021-05-13 20:23 ` Oleg Babin via Tarantool-patches 2021-05-21 19:26 ` Vladislav Shpilevoy via Tarantool-patches 2021-05-24 6:57 ` Oleg Babin via Tarantool-patches 2021-05-19 21:51 ` Yaroslav Dynnikov via Tarantool-patches 2021-05-21 19:30 ` Vladislav Shpilevoy via Tarantool-patches 2021-05-13 20:23 ` [Tarantool-patches] [PATCH 0/2] vshard.storage.buckets_count() bug Oleg Babin via Tarantool-patches 2021-05-25 20:43 ` Vladislav Shpilevoy 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=b580c9081e63a83d39adfabac17b5052de549292.1620903962.git.v.shpilevoy@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=olegrok@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --cc=yaroslav.dynnikov@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 1/2] test: fix test output on latest Tarantool' \ /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