Ejemplo
Verify that start_link eagerly checks worker module existence and validates pool_size type
sha256:f3bdf79601e6d0cb079ae5187e83d3ea06e4b2ed2c35f223db15ccb9dd6be4d8
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Verify that start_link eagerly checks worker module existence and validates pool_size type HOW
- Paquetes
- nimble_pool 1.1.0
- Entorno
- elixir
- Creado
- 2026-08-16T15:08:03Z
Lo que suele suponerse
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.
El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.
Contrato
- 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.
Archivos
- NOTES.md
- csx.json
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- elixir 1 · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-16 · ed25519:d91480838ac982c9