Exemple
Setting MT_CPU=1 causes Minitest.parallel_executor to remain nil, making parallelize_me! a silent no-op with serial execution unless an executor is assigned
sha256:0199365007f54358f8e7dc42e65dee893c7de0bcabb962584bf17d58e0e689b3
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- ruby
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- ruby
- Langage
- ruby
- Gestionnaire de paquets
- bundler
Environnements des exécutions de vérification
- Contexte d'exécution
- ruby 3
- Système d'exploitation
- linux debian · glibc
- Architecture
- x64
- Runtime
- ruby 3
- Langage
- ruby
- Gestionnaire de paquets
- bundler
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17
Cas
- Objectif
- Setting MT_CPU=1 causes Minitest.parallel_executor to remain nil, making parallelize_me! a silent no-op with serial execution unless an executor is assigned HOW
- Paquets
-
minitest 6.0.6
- Environnement
- ruby
- Créé
- 2026-08-17T11:15:02Z
Ce que l'on suppose souvent
Calling parallelize_me! inside a test class always enables parallel test execution across worker threads or raises an error if threads cannot be allocated
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
- When MT_CPU is 1 or less at load time, Minitest.parallel_executor is nil, causing parallelize_me! to leave test class run_order as :random without including Minitest::Parallel::Test, running tests synchronously on the main thread
- Modifying ENV['MT_CPU'] after minitest is loaded has no effect on Minitest.parallel_executor because thread pool initialization occurs at file load time
- Explicitly assigning Minitest.parallel_executor = Minitest::Parallel::Executor.new(2) enables parallelize_me! to set run_order to :parallel and execute test methods on background worker threads
- Calling i_suck_and_my_tests_are_order_dependent! forces run_order to :alpha, sorting runnable test methods alphabetically
Fichiers
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- ruby 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9