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

Exhaustive tests? #139

Closed
sffc opened this issue Jun 19, 2020 · 5 comments · Fixed by #376
Closed

Exhaustive tests? #139

sffc opened this issue Jun 19, 2020 · 5 comments · Fixed by #376
Assignees
Labels
C-test-infra Component: Integration test infrastructure T-enhancement Type: Nice-to-have but not required

Comments

@sffc
Copy link
Member

sffc commented Jun 19, 2020

In ICU, we have an exhaustive test mode for tests that are particularly slow. Examples of tests that might be exhaustive tests:

  1. Test a feature over all locales*
  2. Test the bounds of something (e.g., longest supportive string)

It would be nice if we had an exhaustive test mode in ICU4X, such that running cargo test remains fast and doesn't get stuck on slow tests.

* It's common in ICU to unconditionally test a random subset of locales, and test the full set in exhaustive mode.

@sffc sffc added C-test-infra Component: Integration test infrastructure T-enhancement Type: Nice-to-have but not required labels Jun 22, 2020
@sffc
Copy link
Member Author

sffc commented Jun 23, 2020

We could add a feature like "exhaustive" and conditionally compile the tests only when that feature is enabled. It could be disabled by default.

@Manishearth @zbraniecki @hsivonen Is there a standard practice for this in Rust?

@Manishearth
Copy link
Member

Yeah it's done sometimes

@hsivonen
Copy link
Member

I don't have experience with practices for this.

@sffc sffc self-assigned this Jun 25, 2020
@sffc sffc added the discuss Discuss at a future ICU4X-SC meeting label Oct 30, 2020
@sffc
Copy link
Member Author

sffc commented Oct 30, 2020

Discussion 2020-10-30:

3 types of tests:

  • Overview
    • Run every time you change code (e.g. in local development)
    • Total Duration: a few seconds
  • Exhaustive
    • Run before checking in a feature (e.g. on every PR)
    • Total Duration: a few minutes
  • Slow
    • Run occasionally (e.g. on the main branch)
    • Total Duration: up to an hour

@sffc
Copy link
Member Author

sffc commented Nov 3, 2020

I'm going to consider this resolved by #376. I am adding a new cargo quick command that runs only the fastest tests; it finishes in less than 2 seconds on my laptop for all of ICU4X. If and when we do eventually need to blacklist slow tests, we can do so in the framework proposed in #376.

@sffc sffc closed this as completed in #376 Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-test-infra Component: Integration test infrastructure T-enhancement Type: Nice-to-have but not required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants