Pharo test defects

TaskIt: a new-process task runner test fails at random

State
Open: draft fix, not validated
Defect in
the Pharo image or the test (not proven)
Tests
1
Fix
draft only
Upstream repository
pharo-project/pharo

Summary

TKTNewProcessTaskRunnerTest>>testNewProcessTaskRunnerRunsInNewProcessEveryTime failed 1 time in the sweep sweep14-new14 of our VM ("Got 9 instead of 10"). It passed in the 5 other saved sweeps of 2026-11-17 (3 of our VM, 2 of the patched Cog). The source of the test says that it fails at random on the CI of Pharo. The cause is not proven.

Test

"Run in a Playground of a Pharo 14 image (Do it and print each line)."
((TKTNewProcessTaskRunnerTest selector: #testNewProcessTaskRunnerRunsInNewProcessEveryTime) run) printString.
testNewProcessTaskRunnerRunsInNewProcessEveryTime

	| runner hashes futures hashesSet |
	self skipOnPharoCITestingEnvironment.
	"this fails randomly on the CI"

	runner := TKTNewProcessTaskRunner new.
	hashes := AtomicSharedQueue new.

	futures := (1 to: 10) collect: [ :i | (runner future: [ Processor activeProcess identityHash ]) onSuccessDo: [ :v | hashes nextPut: v ] ].

	futures do: [ :each | each waitForCompletion: 2 seconds ].

	hashesSet := Set new.
	[ hashes isEmpty ] whileFalse: [ hashesSet add: hashes next ].
	self assert: hashesSet size equals: 10

Fix

None yet. A draft of a test change exists in the iospharo working tree. The draft is not validated, and its cause is a hypothesis, so it is not published here.

State of 2026-11-20. Made from the test records of the iospharo project (a second Pharo VM). The fixes are proposals for review.