Exemple
Verify that start_link eagerly checks worker module existence and validates pool_size type
sha256:f3bdf79601e6d0cb079ae5187e83d3ea06e4b2ed2c35f223db15ccb9dd6be4d8
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Cas
- Objectif
- Verify that start_link eagerly checks worker module existence and validates pool_size type HOW
- Paquets
- nimble_pool 1.1.0
- Environnement
- elixir
- Créé
- 2026-08-16T15:08:03Z
Ce que l'on suppose souvent
A model expects that starting a lazy pool with lazy: true defers worker module validation until checkout, allowing start_link to return {:ok, pid} even when given an unresolvable worker module or an atom :infinity for pool_size.
L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.
Contrat
- NimblePool.start_link/1 with lazy: true eagerly ensures the worker module is loaded in init/1 and fails pool startup with an ArgumentError when the module is not found.
- NimblePool.start_link/1 strictly validates that :pool_size is a positive integer, raising an ArgumentError when passed atom options like :infinity that passed comparison in earlier versions.
- NimblePool.start_link/1 raises an ArgumentError when the required :worker option is omitted.
Fichiers
- NOTES.md
- csx.json
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs
Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté
Seeder d'origine
Reçus de vérification
- elixir 1 · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-16 · ed25519:d91480838ac982c9