Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and refine the readme #323

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

NickVolynkin
Copy link
Contributor

@NickVolynkin NickVolynkin commented Feb 14, 2022

@coveralls
Copy link

coveralls commented Feb 14, 2022

Coverage Status

Coverage increased (+0.04%) to 63.598% when pulling ef57de9 on NickVolynkin:update-readme into f246567 on tarantool:master.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated
### Other parameters


* `show_reproduce_content` (optional, `True` by default) — TODO: what's this?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I've added this info to the document

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However now we just re-run the server each time. It seems, the option has no sense (as well as reproduce files at all).

OTOH, there are at least particular cases, where it increases run time more than twice, see the table in tarantool/tarantool#6849 (comment). Are there chances that we'll return to running of several tests within one tarantool instance? Don't know. I would better pay some machine resources to restart tarantools rather than human resources to investigate tricky problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've found a single use case: ./sql-tap/suite.ini:31:show_reproduce_content = False. So, for all other tests this value is True (by default), which is useless — is that really so?

README.md Outdated
* `show_reproduce_content` (optional, `True` by default) — TODO: what's this?
* `is_parallel` (optional, `False` by default) — whether the tests in the suite can run in parallel

* `use_unix_sockets` (optional, `False` by default) — use hard-coded UNIX sockets
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For console, AFAIR.

'Hard-coded' is a bit too hard words. It depends of server's script name.

README.md Outdated
Comment on lines 107 to 110
Next, the test in `.test(.lua|.py)?` is executed.
If this is a first test run and there's no `.result` file yet, it is generated from the output.
If there is a `.result` file, output is written to a `.reject` file,
which is then compared to `.result`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. .test.sql as well.
  2. And _test.lua in luatest test suites.
  3. The autowritting .result file was removed together with introducing the --update-result option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. There is no a word about TAP13 compatible output (it does not need a result file).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed enumeration of test file extensions from this line, it resolves (1) and (2). Also, I won't mention writing .result files at all. Moved it to a separate issue: #327

Added a few words about TAP13

README.md Outdated
Comment on lines 112 to 118
If there's a difference between `.reject` and `.result`, the following happens:

1. The last 15 lines of diff are printed to output.
2. The `.reject` file is saved in the `<vardir>/rejects/<suite>`
subfolder given in options or set locally as `var/rejects/<suite>` by default.

If there is no difference between `.reject` and `.result`, the `.reject` file is deleted.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know, whether it is useful, to be honest.

@NickVolynkin NickVolynkin force-pushed the update-readme branch 2 times, most recently from 924fb2a to 3d72b30 Compare February 18, 2022 10:30
README.md Outdated

* `description`

* `script` — A file with Tarantool commands.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would call a core = tarantool test as 'a file with tarantool commands'. Instance file is a Lua script.

README.md Outdated
Comment on lines 146 to 150
Each test consists of the following files:

* Test file: `<name>.test.lua`, `<name>_test.lua`, `<name>.test.py`, or `<name>.test.sql`.
* Reference file: `<name>.result`.
* Skip condition file: `<name>.skipcond`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The altter two bullets are optional, but the text looks like they're mandatory.

README.md Outdated
Comment on lines 157 to 160
The optional skip condition file is a Python script.
In the local Python environment of a test run there's a `self` object,
which is an instance of the [`Test` class](./lib/test.py).
Set `self.skip = 1` to skip this test.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave a couple of words about the idea of the skipcond file. The typical usage is to skip a test on given OS, say, on Mac OS.


Files: `<name>.test.py`, `<name>.result` and `<name>.skipcond`(optionaly).
Files: `<name>.test.py`, `<name>.result` and `<name>.skipcond` (optionally).

Environment:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sql was changed to remote in 2015 (a9adaf5) and then renamed to iproto (6adba83). Also the BoxConnection class definitely changes its meaning since those times. The examples below are irrelevant.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While admin below still actual.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also suggest to re-verify that the example below still work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to touch this part of readme in this PR. Will review it later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How I'll differentiate parts, where problems are left deliberately and where it is unintentional? No, I think your point does not work here: your changes are not so dense.

@@ -166,14 +302,14 @@ box.info.lsn
...
```

#### Lua
### Lua

Files: `<name>.test.lua`, `<name>.result` and `<name>.skipcond`(optionaly).
Tests interact only with `AdminConnection`. Supports some preprocessor functions (eg `delimiter`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests interact only with AdminConnection.

Don't know what it means, but it looks irrelevant now.

@@ -166,14 +302,14 @@ box.info.lsn
...
```

#### Lua
### Lua
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

core = tarantool and core = app tests are really different. It worth to split its description.

@@ -337,7 +473,7 @@ test_run:cmd('setopt delimiter ""');
join(test_run, 30)
```

### pretest_clean()
## pretest_clean()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's strange that a function name is here. Let's give the section a human readable title.

@Totktonada
Copy link
Member

That's really boring to write all those details. Maybe it is better to book 1,5 hours and traverse over all features and tricks of test-run known to me. We can start with reviewing the readme file and expend it beyond if time will permit. Or, maybe, a hour about user visible behaviour and a hour for internal details.

@NickVolynkin NickVolynkin marked this pull request as ready for review March 4, 2022 10:45
@NickVolynkin NickVolynkin self-assigned this Mar 4, 2022
@Totktonada
Copy link
Member

Totktonada commented Mar 4, 2022

My comments are mostly not answered. It is in the responsibility of a developer to update all discussions before asking for a next review. Otherwise a reviewer will be obligated to re-check every point, which (s)he highlighted. It is time consuming and not profitable.

I see a temporary commit in this pull request. I expect ready-to-go (in your opinion) pull request, when a review is acquired. Please, elaborate.

After this I'll look at your answers and, if nothing will confuse me, can skip re-check of the changes. You'll wait less time for review so.

Please, take me right. I review 50-60 PRs per month. I would not able to do so without 'extra' effort from developers to make reviews simpler.

@Totktonada Totktonada removed their request for review March 4, 2022 18:38
@NickVolynkin NickVolynkin force-pushed the update-readme branch 2 times, most recently from 0f1f4da to 827dd33 Compare March 9, 2022 06:07
@Totktonada
Copy link
Member

My comments are mostly not answered.

Still. Please, find another reviewer.

@Totktonada Totktonada removed their request for review March 16, 2022 23:51
@ylobankov ylobankov assigned ylobankov and unassigned NickVolynkin Jun 7, 2022
@kyukhin kyukhin marked this pull request as draft September 8, 2023 07:49
@ylobankov ylobankov assigned ochaplashkin and unassigned ylobankov Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants