[squeak-dev] The Inbox: ToolsTests-ct.99.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Sep 24 10:23:29 UTC 2020


A new version of ToolsTests was added to project The Inbox:
http://source.squeak.org/inbox/ToolsTests-ct.99.mcz

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

Name: ToolsTests-ct.99
Author: ct
Time: 24 September 2020, 12:23:28.743708 pm
UUID: 3344a54d-786b-f948-b7c3-dc44fc21fe50
Ancestors: ToolsTests-mt.98

Increases timeout for WeakSetInspectorTest >> #testSymbolTableM6812 which includes a call to the GC.

=============== Diff against ToolsTests-mt.98 ===============

Item was changed:
  ----- Method: WeakSetInspectorTest>>testSymbolTableM6812 (in category 'tests') -----
  testSymbolTableM6812
  	"This test is related to http://bugs.squeak.org/view.php?id=6812. Check whether field selection and garbage collection are somehow interfering."
+ 	<timeout: 10 "seconds"> "#garbageCollect can be an expensive operation"
  	
  	| getRandomSymbol symbols priorContents currentContents currentIndex |
  	self object removeAll.
  	
  	getRandomSymbol := [ 
  		| token |
  		token := (1 to: 10) collect: [:ea | ($a to: $z) atRandom] as: String.
  		(Symbol lookup: token) ifNil: [token asSymbol] ifNotNil: [nil]].
  
  	symbols := OrderedCollection new.
  	10 timesRepeat: [
  		getRandomSymbol value ifNotNil: [:symbol | symbols add: symbol]].	
  
  	self object addAll: symbols.
  	Smalltalk garbageCollect.
  	self assert: symbols size equals: self object size.
  	self assert: symbols notEmpty.
  	
  	1 to: symbols size do: [:round |
  		currentIndex := 1.
  		symbols removeLast.
  
  		[(currentIndex := currentIndex + 1) <= self inspector fieldList size]
  			whileTrue: [
  				self inspector selectionIndex: currentIndex.
  				self assert: priorContents ~= (currentContents := self inspector contents).
  				priorContents := currentContents.
  
  				Smalltalk garbageCollect. "Removes symbol from weak set"
  				self simulateStepping. "Removes field from weak-set inspector"]].
  	
  	self assert: symbols isEmpty.
  	self assert: self object isEmpty.!



More information about the Squeak-dev mailing list