| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Arbiter.Test.ConcurrencyLimit
Description
Backend-parameterized integration tests for per-job concurrency limits over the shared
CLReg registry. Each job's key comes from the HasConcurrency instance for CLPayload.
Synopsis
- newtype CLPayload = CLPayload Text
- type CLReg = '[Queue "arbiter_concurrency_test" CLPayload]
- concurrencyTable :: Text
- concurrencyLimitSpec :: forall env m. HasRegistry m CLReg => (forall a. env -> m a -> IO a) -> SpecWith env
Documentation
A payload that selects a concurrency policy by its text. mx, my and mz
select those policies (limits 1, 2 and 3) on one key. Other text selects declpolicy
(limit 2), keyed by the text.
Instances
| FromJSON CLPayload Source # | |||||
Defined in Arbiter.Test.ConcurrencyLimit | |||||
| ToJSON CLPayload Source # | |||||
| HasConcurrency CLPayload Source # | |||||
Defined in Arbiter.Test.ConcurrencyLimit Methods | |||||
| Eq CLPayload Source # | |||||
| Generic CLPayload Source # | |||||
Defined in Arbiter.Test.ConcurrencyLimit Associated Types
| |||||
| Show CLPayload Source # | |||||
| type Rep CLPayload Source # | |||||
Defined in Arbiter.Test.ConcurrencyLimit | |||||
type CLReg = '[Queue "arbiter_concurrency_test" CLPayload]Source #
A one-queue registry over CLPayload.
concurrencyTable :: TextSource #
Table name for CLReg, shared across backends.
concurrencyLimitSpec :: forall env m. HasRegistry m CLReg => (forall a. env -> m a -> IO a) -> SpecWith envSource #
The concurrency-limit suite, run against any backend.
Build the schema with setupOnce and empty it before each test with cleanupData.