Skip to content

luatest: allow to run test cases in parallel #433

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

Merged
merged 2 commits into from
Jun 8, 2024

Conversation

Totktonada
Copy link
Member

Requires tarantool/luatest#378.

Feels better with #432.


In order to use the feature, add the following comment to a beginning of the test file:

-- tags: parallel

It is hard to understand and hard to extend. This commit attempts to
arrange the method.

Points to highlight:

* Two old hacks are kept as is and got TODO comments. I'm a bit worrying
  about compatibility here and I would return here back later.
* `tests` and `exclude` patterns are obtained directly from the CLI
  options object, because I don't see a reason to pass them over the
  test suite object.
* `Server.exclude_tests` helper is not used anymore. A filtering by tags
  is included right into the test searching method.
* All the filtering conditions are expressed in a similar way, so more
  ones may be added in a future.
In order to use the feature, add the following comment to a beginning of
the test file:

```lua
-- tags: parallel
```
Totktonada added a commit that referenced this pull request Jun 8, 2024
The new version includes one commit.

- Add --list-test-cases and --run-test-case [1]

This commit is necessary for the new `tags: parallel` functionality
added in PR #433.

[1] tarantool/luatest@fcabd2a
@Totktonada
Copy link
Member Author

Requires tarantool/luatest#378.

The bump of the submodule is in PR #436.

Feels better with #432.

It already lands to test-run.

ylobankov pushed a commit that referenced this pull request Jun 8, 2024
The new version includes one commit.

- Add --list-test-cases and --run-test-case [1]

This commit is necessary for the new `tags: parallel` functionality
added in PR #433.

[1] tarantool/luatest@fcabd2a
@ylobankov ylobankov merged commit dd00063 into master Jun 8, 2024
19 checks passed
@ylobankov ylobankov deleted the Totktonada/luatest-run-test-cases-in-parallel branch June 8, 2024 18:38
Totktonada added a commit that referenced this pull request Jun 17, 2024
It is a regression from commit 3b0ccd0 ("luatest: detox test
searching code"), PR #433.

The ability to run a test several times, especially in parallel, is very
useful to reproduce and debug an unstable behavior in the test.

Fixes #437
Totktonada added a commit that referenced this pull request Jun 18, 2024
It is a regression from commit 3b0ccd0 ("luatest: detox test
searching code"), PR #433.

The ability to run a test several times, especially in parallel, is very
useful to reproduce and debug an unstable behavior in the test.

Fixes #437
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.

3 participants