Skip to content

Remove EffectCompat from Test signature.#305

Merged
zainab-ali merged 3 commits intotypelevel:mainfrom
zainab-ali:remove-effect-compat-from-test
Apr 20, 2026
Merged

Remove EffectCompat from Test signature.#305
zainab-ali merged 3 commits intotypelevel:mainfrom
zainab-ali:remove-effect-compat-from-test

Conversation

@zainab-ali
Copy link
Copy Markdown
Contributor

@zainab-ali zainab-ali commented Apr 17, 2026

The EffectCompat typeclass combines Async and Parallel instances, and has a few overridable helper functions.

In particular, the realTimeMillis function is used to override the clock time when testing.

EffectCompat is present in the Test class signature. Users who implement their own SharedResourceSuite must construct a Test, so must have access to an EffectCompat. This can be confusing.

This PR replaces EffectCompat implicit with cats-effect typeclasses. The EffectCompat instance is deconstructed into Clock, Defer and Concurrent, such that the Clock can be replaced during testing.

@zainab-ali zainab-ali marked this pull request as ready for review April 20, 2026 09:20
@zainab-ali zainab-ali merged commit 2e66b4c into typelevel:main Apr 20, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants