Skip to content
New issue

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

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

Already on GitHub? # to your account

Shuffle tests #118

Merged
merged 5 commits into from
Jul 11, 2022
Merged

Shuffle tests #118

merged 5 commits into from
Jul 11, 2022

Conversation

ligurio
Copy link
Member

@ligurio ligurio commented Jul 9, 2022

PR introduces two changes:

  1. shuffling tests in luatest
    luatest has an option --shuffle that allows to randomise the order of
    tests. This can be useful to detect a test that passes just because it
    happens to run after an unrelated test that leaves the system in a
    favourable state. Patch enable tests shuffling with predefined random
    seed specified by $RANDOM. Seed is useful for reproducing problems
    related to the specific test order.
  2. bump luatest version

@ligurio ligurio force-pushed the ligurio/shuffle-tests branch from 6c503bc to 359a1f3 Compare July 11, 2022 08:02
oleg-jukovec added a commit that referenced this pull request Jul 11, 2022
Tests that change expirationd.cfg did not perform a teardown correctly.
The tests broke other tests after shuffling. The patch resets
expirationd to the default configuration after execution of such tests.

Related to #118
oleg-jukovec added a commit that referenced this pull request Jul 11, 2022
The test just stop the task. It must to kill the task to perform
a cleanup.

Related to #118
oleg-jukovec added a commit that referenced this pull request Jul 11, 2022
Metrics is now enabled by default. We need to clear it state before
running the appropriate tests to make sure there is no data from
previous tests.

Related to #118
Copy link
Contributor

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

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

Thank you for the patch! That's a great improvement.

I don't like an idea to leave the master branch with broken tests. It will be great if you cherry-pick fixes from the branch (be free to change what you want in the fixes) :

https://github.com/tarantool/expirationd/tree/oleg-jukovec/shuffle-tests-fix

I don't insist, but I will be grateful if you do it. Please let me know if you don't want to do this. Then I will merge this pull request and create a new one with fixes.

@ligurio ligurio force-pushed the ligurio/shuffle-tests branch from 359a1f3 to 3547b45 Compare July 11, 2022 08:42
@ligurio
Copy link
Member Author

ligurio commented Jul 11, 2022

I don't like an idea to leave the master branch with broken tests.

Sure, totally agree. Tests were broken just because I haven't time to fix them.

It will be great if you cherry-pick fixes from the branch (be free to change what you want in the fixes) :
https://github.com/tarantool/expirationd/tree/oleg-jukovec/shuffle-tests-fix

Thanks for fixes! I have rebased to your branch and CI become green.

oleg-jukovec and others added 4 commits July 11, 2022 11:53
Tests that change expirationd.cfg did not perform a teardown correctly.
The tests broke other tests after shuffling. The patch resets
expirationd to the default configuration after execution of such tests.

Related to #118
The test just stop the task. It must to kill the task to perform
a cleanup.

Related to #118
Metrics is now enabled by default. We need to clear it state before
running the appropriate tests to make sure there is no data from
previous tests.

Related to #118
@ligurio ligurio force-pushed the ligurio/shuffle-tests branch from 3547b45 to cab344b Compare July 11, 2022 08:53
luatest has an option --shuffle that allows to randomise the order of
tests. This can be useful to detect a test that passes just because it
happens to run after an unrelated test that leaves the system in a
favourable state. Patch enable tests shuffling with predefined random
seed specified by $RANDOM. Seed is useful for reproducing a problems
related to the specific test order.
@ligurio ligurio force-pushed the ligurio/shuffle-tests branch from cab344b to f1ad823 Compare July 11, 2022 09:14
Copy link
Contributor

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM.

@oleg-jukovec oleg-jukovec merged commit 3f3822f into master Jul 11, 2022
@oleg-jukovec oleg-jukovec deleted the ligurio/shuffle-tests branch July 11, 2022 09:52
oleg-jukovec added a commit that referenced this pull request Jul 11, 2022
Tests that change expirationd.cfg did not perform a teardown correctly.
The tests broke other tests after shuffling. The patch resets
expirationd to the default configuration after execution of such tests.

Related to #118
oleg-jukovec added a commit that referenced this pull request Jul 11, 2022
The test just stop the task. It must to kill the task to perform
a cleanup.

Related to #118
oleg-jukovec added a commit that referenced this pull request Jul 11, 2022
Metrics is now enabled by default. We need to clear it state before
running the appropriate tests to make sure there is no data from
previous tests.

Related to #118
oleg-jukovec added a commit that referenced this pull request Aug 4, 2022
Overview

    This release adds a Tarantool Cartridge role for expirationd
    package and improves the default behavior.

Breaking changes

    None.

New features

    Continue a task from a last tuple (#54).

    Decrease tarantool-checks dependency from 3.1 to 2.1 (#124).

    Process a task on a writable space by default (#42).

    Wait until a space or an index is created (#68, #116).

    Tarantool Cartridge role (#107).

Bugfixes

    Fix build and installation of rpm/deb packages (#124).

    Do not restart work fiber if index does not exist (#64).

    Update changelogs for rpm/deb packages.

Testing

    Shuffle tests (#118).

    Fix test_mvcc_vinyl_tx_conflict (#104, #105).

    Fix flaky 'simple expires test' (#90).

Other

    Add GitHub Actions workflow with debug Tarantool build (#102).

    Add GitHub Actions workflow for deploying module packages to S3
    based repositories (#43).
@oleg-jukovec oleg-jukovec mentioned this pull request Aug 4, 2022
oleg-jukovec added a commit that referenced this pull request Aug 4, 2022
Overview

    This release adds a Tarantool Cartridge role for expirationd
    package and improves the default behavior.

Breaking changes

    None.

New features

    Continue a task from a last tuple (#54).

    Decrease tarantool-checks dependency from 3.1 to 2.1 (#124).

    Process a task on a writable space by default (#42).

    Wait until a space or an index is created (#68, #116).

    Tarantool Cartridge role (#107).

Bugfixes

    Fix build and installation of rpm/deb packages (#124).

    Do not restart a work fiber if an index does not exist (#64).

    Update changelogs for rpm/deb packages.

Testing

    Shuffle tests (#118).

    Fix test_mvcc_vinyl_tx_conflict (#104, #105).

    Fix flaky 'simple expires test' (#90).

Other

    Add GitHub Actions workflow with debug Tarantool build (#102).

    Add GitHub Actions workflow for deploying module packages to S3
    based repositories (#43).
oleg-jukovec added a commit that referenced this pull request Aug 5, 2022
Overview

    This release adds a Tarantool Cartridge role for expirationd
    package and improves the default behavior.

Breaking changes

    None.

Deprecated

    Obsolete functions: task_stats, kill_task, get_task, get_tasks, run_task,
    show_task_list.

New features

    Continue a task from a last tuple (#54).

    Decrease tarantool-checks dependency from 3.1 to 2.1 (#124).

    Process a task on a writable space by default (#42).

    Wait until a space or an index is created (#68, #116).

    Tarantool Cartridge role (#107).

Bugfixes

    Fix build and installation of rpm/deb packages (#124).

    Do not restart a work fiber if an index does not exist (#64).

    Update changelogs for rpm/deb packages.

Testing

    Shuffle tests (#118).

    Fix test_mvcc_vinyl_tx_conflict (#104, #105).

    Fix flaky 'simple expires test' (#90).

Other

    Add GitHub Actions workflow with debug Tarantool build (#102).

    Add GitHub Actions workflow for deploying module packages to S3
    based repositories (#43).
oleg-jukovec added a commit that referenced this pull request Aug 11, 2022
Overview

    This release adds a Tarantool Cartridge role for expirationd
    package and improves the default behavior.

Breaking changes

    None.

Deprecated

    Obsolete functions: task_stats, kill_task, get_task, get_tasks, run_task,
    show_task_list.

New features

    Continue a task from a last tuple (#54).

    Decrease tarantool-checks dependency from 3.1 to 2.1 (#124).

    Process a task on a writable space by default (#42).

    Wait until a space or an index is created (#68, #116).

    Tarantool Cartridge role (#107).

Bugfixes

    Fix build and installation of rpm/deb packages (#124).

    Do not restart a work fiber if an index does not exist (#64).

    Update changelogs for rpm/deb packages.

Testing

    Shuffle tests (#118).

    Fix test_mvcc_vinyl_tx_conflict (#104, #105).

    Fix flaky 'simple expires test' (#90).

Other

    expirationd.start() parameter `space_id` has been renamed to
    `space` (#112).

    Add GitHub Actions workflow with debug Tarantool build (#102).

    Add GitHub Actions workflow for deploying module packages to S3
    based repositories (#43).
oleg-jukovec added a commit that referenced this pull request Aug 11, 2022
Overview

    This release adds a Tarantool Cartridge role for expirationd
    package and improves the default behavior.

Breaking changes

    None.

Deprecated

    Obsolete functions: task_stats, kill_task, get_task, get_tasks, run_task,
    show_task_list.

New features

    Continue a task from a last tuple (#54).

    Decrease tarantool-checks dependency from 3.1 to 2.1 (#124).

    Process a task on a writable space by default (#42).

    Wait until a space or an index is created (#68, #116).

    Tarantool Cartridge role (#107).

Bugfixes

    Fix build and installation of rpm/deb packages (#124).

    Do not restart a work fiber if an index does not exist (#64).

    Update changelogs for rpm/deb packages.

Testing

    Shuffle tests (#118).

    Fix test_mvcc_vinyl_tx_conflict (#104, #105).

    Fix flaky 'simple expires test' (#90).

Other

    expirationd.start() parameter `space_id` has been renamed to
    `space` (#112).

    Add GitHub Actions workflow with debug Tarantool build (#102).

    Add GitHub Actions workflow for deploying module packages to S3
    based repositories (#43).
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants