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

Use clock library to enhance testing #764

Open
Bolodya1997 opened this issue Mar 10, 2021 · 6 comments
Open

Use clock library to enhance testing #764

Bolodya1997 opened this issue Mar 10, 2021 · 6 comments
Assignees
Labels
blocked Something is blocking this enhancement New feature or request

Comments

@Bolodya1997
Copy link

Issue

We are running all our unit tests on multiple platforms with --race flag. It does mean that any timeout test becomes either slow or not stable or both, because we have totally no idea how long could it take for something to happen.

Solution

Instead of using timeouts in tests we can use some clock library (e.g. https://github.com/benbjohnson/clock) to use mocked time in tests and real time in applications.

@Bolodya1997 Bolodya1997 added the enhancement New feature or request label Mar 10, 2021
@denis-tingaikin
Copy link
Member

@edwarnicke Can we go with this?

This can speed up our unit tests. This problem is most actual for #650 where we have long tests to check functionality based on timers.

@edwarnicke
Copy link
Member

@denis-tingaikin I had a long talk with @Bolodya1997 about this... and am fully in support :)

@Bolodya1997 Bolodya1997 self-assigned this Mar 18, 2021
@Bolodya1997 Bolodya1997 mentioned this issue Mar 23, 2021
@Bolodya1997
Copy link
Author

Linked PRs:

@Bolodya1997
Copy link
Author

Blocker for #823.

@Bolodya1997 Bolodya1997 added the ASAP The issue that blocking SOW items or core use-cases label May 4, 2021
@edwarnicke
Copy link
Member

@Bolodya1997 Is this still in progress?

@Bolodya1997
Copy link
Author

It is actually done (#785) but blocked by #811. Just need to merge dependent PR and rebase.

@Bolodya1997 Bolodya1997 added the blocked Something is blocking this label May 18, 2021
@Bolodya1997 Bolodya1997 removed the ASAP The issue that blocking SOW items or core use-cases label Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Something is blocking this enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants