Repository navigation
Remove slow waits and redundant cases from effect tests - #10681
Open
effect-bot wants to merge 2 commits into
Open
effect-bot wants to merge 2 commits into
effect-bot wants to merge 2 commits into
Conversation
|
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
This branch has not been deployed
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.
Maintenance pass on the
effecttest project. Three files are touched, every change was checked against a source mutation where that applies, and no source code changes.Changes
test/TestClock.test.ts: the two "warnings bypass TestConsole" tests waited out the default 1swarningDelayon the live clock, one after the other (2.0s per file run). They now run underit.liveand provide the same environmentit.effectuses (TestConsole.layer+TestClock.layer) with a 10ms delay.it.livestarts without TestConsole, so the clock captures the real console and the test can still tell the two destinations apart. Dropping theliveConsolerouting fromTestClock.tsstill fails both tests. Because these stay on an@effect/vitestrunner, a hang is still interrupted on timeout and the console spies are restored. Withwakemade to hang, a follow-up test seesconsole.logunmocked; under plainit+Effect.runPromiseit stayed mocked.test/cluster/ClusterWorkflowEngine.test.ts: the durable clock case of "completes ... after a transient failure" slept for 1 second, whichpollUntilwalks in 1ms steps (around 1000 storage polls per test). 300ms is still after the first 200ms save retry, so the clock is pending when the retry runs. Computing the deadline insideretryPersistencestill fails both variants.test/schema/representation/codegen.annotations.test.ts: seven reference-identifier tests that differed only in the input key (abc,Abc,1a,a-b,café,🤖,"") are now one table assertion. Every input/expected pair is kept, and a failure shows the whole table diff. The collision test and the identifier-annotation test stay separate because they cover different paths.Measurements
Full
effectproject,pnpm vitest --run --project effect, 16 cores, shared host:That full-project difference is within noise, and other runs on the same host under load varied between 18s and 208s. The per-test numbers are consistent across all eight runs:
TestClock.test.tsgoes from about 2.0s to under 0.25s.Closes EFF-3854