[squeak-dev] The Inbox: KernelTests-jar.406.mcz

commits at source.squeak.org commits at source.squeak.org
Mon May 24 21:02:42 UTC 2021


A new version of KernelTests was added to project The Inbox:
http://source.squeak.org/inbox/KernelTests-jar.406.mcz

==================== Summary ====================

Name: KernelTests-jar.406
Author: jar
Time: 24 May 2021, 11:02:39.394885 pm
UUID: 08657090-5a49-f84b-904f-8a37f5f2ec75
Ancestors: KernelTests-jar.405

Test a situation when a process terminating another process is terminated in the middle of the unwind. make sure both processes are unwound correctly.

=============== Diff against KernelTests-jar.405 ===============

Item was added:
+ ----- Method: ProcessTest>>testTerminateInTerminate (in category 'tests') -----
+ testTerminateInTerminate
+ 	"Terminating a terminator process should unwind both the terminator and its terminatee process"
+ 	
+ 	| terminator terminatee unwound |
+ 	unwound := false.
+ 	terminatee := [[Processor activeProcess suspend] ensure: [unwound := true]] fork.
+ 	Processor yield.
+ 	terminator := [terminatee terminate] newProcess.
+ 	self assert: terminatee isSuspended.
+ 	self assert: terminator isSuspended.
+ 	terminator runUntil: [:ctx | ctx selectorToSendOrSelf = #suspend]. "first #suspend in #terminate"
+ 	self assert: terminator isSuspended.
+ 	terminator terminate.
+ 	self assert: terminator isTerminated. 
+ 	self assert: unwound!



More information about the Squeak-dev mailing list