Repository navigation
test(solid): give the many decks and agents growth tests 180 s - #488
Merged
Merged
Conversation
The toDecks and readDeckFile growth tests of GHSA-hcrw-cr33-jg78 map or parse thousands of decks many times over: about 6 and 8 seconds with every package's tests on a laptop, and many times that in CI, coverage on and every package's tests run at once on two cores. There toDecks' test passed the 60 s default and failed, though its ratio was not the matter. What the tests hold to is the ratio of CPU time; the clock only stops a test that never ends, as the card writes' growth tests already say with the same 180 s.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The
toDecksandreadDeckFilegrowth tests of GHSA-hcrw-cr33-jg78 map or parse thousands of decks many times over. On a laptop, run with every package's tests, they take about 6 and 8 seconds. CI is many times slower: coverage is on and every package's tests run at once on two cores. In #486's CI run, thetoDeckstest went past vitest's 60 s default and failed, though the ratio it checks was not the problem. #486 doesn't touchpackages/solid; the test has been onmainsince #461, so any pull request can hit this.What the tests hold to is the ratio of CPU time. The clock only stops a test that never ends. Both tests now get
{ timeout: 180_000 }, as the card writes' growth tests insolidDeckRepository.growth.test.tsalready have, with the same comment saying why.Refs: #486
Checklist
Refs:, notCloses:. Leave this unchecked otherwise.npm run checkpasses (lint, Markdown and spelling included),npm run lint:reusetoo if a file was added, andnpm run crosschecktoo ifns/ordecks/changed. (npm run checkpasses; no file added,ns/anddecks/unchanged.)docs/is listed in docs/docs.ttl. (n/a: the docs don't name test timeouts.)packages/ui/src/i18n/). (n/a: no message changed.)ns/was agreed in an issue first; no publishedns/shapes/*/vN.ttlordecks/*/vN.ttlwas edited; generated files were regenerated, not edited. (n/a: nothing inns/ordecks/.)!and aBREAKING CHANGE:footer).npm run check:breakingsees a line ofapi/that goes, but not a feature removed, nor a reader that reads less than before. (Tests only.)npm run lint:reuse), or a new deck its line inREUSE.toml; third-party content is credited. (n/a: no new file.)npm run dev) and tried the change, and considered the user journeys. (n/a: tests only; nothing the app does changed.)type(scope): subject,!and aBREAKING CHANGE:footer if it breaks something), with an imperative subject and a body that explains why (CONTRIBUTING.md).