Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org,
	Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v2 2/2] Fixed lost format on update and upsert operations.
Date: Sun, 15 Apr 2018 16:18:06 +0300	[thread overview]
Message-ID: <b8687ad4-4d77-449b-08cb-1d63737d1ef2@tarantool.org> (raw)
In-Reply-To: <f724f6b0-9b99-385c-5830-8037663c0c5b@tarantool.org>

Hello. See below 6 comments.

1. I fixed some of my comments, and pushed them with --force.
You can see them using diff your local and remote changes. After
this do pull. Please, try to investigate, why your text editor
uses spaces for multiline statements alignment, and fix it.

2. I do not see a test on upsert - please, add.

3. Please, add a test on incorrect update.

4. In the previous letter I have asked you to move the test into
engine/ suite. You can not get different engines on box/ suite:

[001] Test failed! Result content mismatch:
[001] --- box/update.result	Sun Apr 15 15:55:23 2018
[001] +++ box/update.reject	Sun Apr 15 16:07:40 2018
[001] @@ -861,6 +861,10 @@
[001]  engine = inspector:get_cfg('engine')
[001]  ---
[001]  ...
[001] +engine
[001] +---
[001] +- null
[001] +...
[001]  format = {}
[001]  ---
[001]  ...
[001]


As you can see, I printed engine variable in you test and 1) it is null,
2) the test is not run 2 times - with engine = memtx and engine = vinyl.
For this you must use engine/ suite, not box/.



> +test_run = require('test_run')
> +inspector = test_run.new()

5. It is not needed to create a new test run each time when you need to
get a variable from environment. Here the test run already is created.

> +engine = inspector:get_cfg('engine')
>   format = {}


> -s = box.schema.space.create('tst_sample', {engine = 'vinyl', format = format} > -pk = s:create_index('pk')
> -s:insert({1, 'sss'})
> -aa = box.space.tst_sample:get(1)
> -aa.VAL
> -aa = aa:update({{'=',2,'ssss'}})
> -collectgarbage()
> -aa.VAL
> -s:drop()
> -aa = nil
> -collectgarbage()
>   
>   -- test transform integrity
>   space = box.schema.space.create('tweedledum')

6. Try to do not create a new space to test each tuple. You can create
one space, and test on it transform, correct update, correct upsert,
incorrect update, incorrect upsert.

Too many actions for such simple test is not good, because test count
grows every day, and running all of them is already too long.

  reply	other threads:[~2018-04-15 13:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06 16:24 [tarantool-patches] [PATCH v2 0/2] Fix lost format on update operation Kirill Shcherbatov
2018-04-06 16:24 ` [tarantool-patches] [PATCH v2 1/2] Fixed invalid check in lbox_tuple_transform Kirill Shcherbatov
2018-04-06 16:24 ` [tarantool-patches] [PATCH v2 2/2] Fixed lost format on update and upsert operations Kirill Shcherbatov
2018-04-08 13:56   ` [tarantool-patches] " Vladislav Shpilevoy
2018-04-10 10:23     ` Kirill Shcherbatov
2018-04-10 10:44       ` Vladislav Shpilevoy
2018-04-15 10:03         ` Kirill Shcherbatov
2018-04-15 13:18           ` Vladislav Shpilevoy [this message]
2018-04-16  7:47             ` Kirill Shcherbatov
2018-04-16 10:07               ` Vladislav Shpilevoy
2018-04-16 16:51                 ` Kirill Shcherbatov
2018-04-16 17:14                   ` Vladislav Shpilevoy
2018-04-18 12:28                     ` Vladimir Davydov
2018-04-18 12:55                       ` Kirill Shcherbatov
2018-04-22 15:15                         ` Vladislav Shpilevoy
2018-04-28  6:56                           ` Kirill Shcherbatov
2018-04-28  9:29 ` [tarantool-patches] Re: [PATCH v2 0/2] Fix lost format on update operation Vladislav Shpilevoy

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=b8687ad4-4d77-449b-08cb-1d63737d1ef2@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v2 2/2] Fixed lost format on update and upsert operations.' \
    /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