Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-nice.312.mcz ==================== Summary ==================== Name: Tests-nice.312 Author: nice Time: 14 March 2015, 11:47:08.214 pm UUID: d6cd00f5-76ab-4201-a37f-e880c5e5b2e8 Ancestors: Tests-eem.311 Specify a timeout: for some of the MC tests =============== Diff against Tests-eem.311 =============== Item was changed: ----- Method: MCWorkingCopyTest>>testAncestorMerge (in category 'tests') ----- testAncestorMerge + <timeout: 30 "seconds"> | base revA revB revC | base := self snapshot. self change: #a toReturn: 'a1'. revA := self snapshot. self change: #b toReturn: 'b1'. revB := self snapshot. self change: #c toReturn: 'c1'. revC := self snapshot. self should: [self basicMerge: revA] raise: MCNoChangesException. ! Item was changed: ----- Method: MCWorkingCopyTest>>testBackport (in category 'tests') ----- testBackport + <timeout: 30 "seconds"> | inst base final backported | inst := self mockInstanceA. base := self snapshot. self assert: inst one = 1. self change: #one toReturn: 2. self change: #two toReturn: 3. final := self snapshot. [workingCopy backportChangesTo: base info] on: MCChangeSelectionRequest do: [:e | e resume: e patch]. self assert: inst one = 2. self assert: inst two = 3. self assert: workingCopy ancestry ancestors size = 1. self assert: workingCopy ancestry ancestors first = base info. self assert: workingCopy ancestry stepChildren size = 1. self assert: workingCopy ancestry stepChildren first = final info. backported := self snapshot. [workingCopy backportChangesTo: base info] on: MCChangeSelectionRequest do: [:e | e resume: e patch]. self assert: workingCopy ancestry ancestors size = 1. self assert: workingCopy ancestry ancestors first = base info. self assert: workingCopy ancestry stepChildren size = 1. self assert: workingCopy ancestry stepChildren first = backported info. ! Item was changed: ----- Method: MCWorkingCopyTest>>testMergeIntoImageWithNoChanges (in category 'tests') ----- testMergeIntoImageWithNoChanges + <timeout: 30 "seconds"> | base revB revA1 | self change: #a toReturn: 'a'. base := self snapshot. self change: #b toReturn: 'b'. revB := self snapshot. self load: base. self change: #a toReturn: 'a1'. revA1 := self snapshot. self change: #a toReturn: 'a'. self snapshot. self merge: revB. self assert: (workingCopy ancestors size = 2) ! Item was changed: ----- Method: MCWorkingCopyTest>>testMergeIntoUnmodifiedImage (in category 'tests') ----- testMergeIntoUnmodifiedImage | base revA | + <timeout: 30 "seconds"> base := self snapshot. self change: #a toReturn: 'a1'. revA := self snapshot. self load: base. self merge: revA. self assert: (workingCopy ancestors size = 1) ! Item was changed: ----- Method: MCWorkingCopyTest>>testOptimizedLoad (in category 'tests') ----- testOptimizedLoad + <timeout: 30 "seconds"> | inst base diffy | inst := self mockInstanceA. base := self snapshot. self change: #one toReturn: 2. self assert: inst one = 2. diffy := self snapshot asDiffAgainst: base. self deny: diffy canOptimizeLoading. self load: base. self assert: inst one = 1. self assert: diffy canOptimizeLoading. self load: diffy. self assert: inst one = 2. ! Item was changed: ----- Method: MCWorkingCopyTest>>testSelectiveBackport (in category 'tests') ----- testSelectiveBackport + <timeout: 30 "seconds"> | inst base intermediate final | inst := self mockInstanceA. base := self snapshot. self assert: inst one = 1. self change: #one toReturn: 2. intermediate := self snapshot. self change: #two toReturn: 3. final := self snapshot. [workingCopy backportChangesTo: base info] on: MCChangeSelectionRequest do: [:e | | selected patch | patch := e patch. selected := patch operations select: [:ea | ea definition selector = #two]. e resume: (MCPatch operations: selected)]. self assert: inst one = 1. self assert: inst two = 3. self assert: workingCopy ancestry ancestors size = 1. self assert: workingCopy ancestry ancestors first = base info. self assert: workingCopy ancestry stepChildren size = 1. self assert: workingCopy ancestry stepChildren first = final info! Item was changed: ----- Method: MCWorkingCopyTest>>testSimpleMerge (in category 'tests') ----- testSimpleMerge + <timeout: 30 "seconds"> | mother base inst | inst := self mockInstanceA. base := self snapshot. self change: #one toReturn: 2. mother := self snapshot. self load: base. self change: #two toReturn: 3. self snapshot. self assert: inst one = 1. self assert: inst two = 3. self merge: mother. self assert: inst one = 2. self assert: inst two = 3.! |
Do test timeouts add any value, or do they only subtract value by
forcing humans to research non-problems only to discover the timeout value needs to be tweaked? Is there a payoff to continue doing that? On Sat, Mar 14, 2015 at 5:47 PM, <[hidden email]> wrote: > Nicolas Cellier uploaded a new version of Tests to project The Trunk: > http://source.squeak.org/trunk/Tests-nice.312.mcz > > ==================== Summary ==================== > > Name: Tests-nice.312 > Author: nice > Time: 14 March 2015, 11:47:08.214 pm > UUID: d6cd00f5-76ab-4201-a37f-e880c5e5b2e8 > Ancestors: Tests-eem.311 > > Specify a timeout: for some of the MC tests > > =============== Diff against Tests-eem.311 =============== > > Item was changed: > ----- Method: MCWorkingCopyTest>>testAncestorMerge (in category 'tests') ----- > testAncestorMerge > + <timeout: 30 "seconds"> > | base revA revB revC | > > base := self snapshot. > self change: #a toReturn: 'a1'. > revA := self snapshot. > self change: #b toReturn: 'b1'. > revB := self snapshot. > self change: #c toReturn: 'c1'. > revC := self snapshot. > > self should: [self basicMerge: revA] raise: MCNoChangesException. > ! > > Item was changed: > ----- Method: MCWorkingCopyTest>>testBackport (in category 'tests') ----- > testBackport > + <timeout: 30 "seconds"> > | inst base final backported | > inst := self mockInstanceA. > base := self snapshot. > self assert: inst one = 1. > self change: #one toReturn: 2. > self change: #two toReturn: 3. > final := self snapshot. > [workingCopy backportChangesTo: base info] > on: MCChangeSelectionRequest > do: [:e | e resume: e patch]. > self assert: inst one = 2. > self assert: inst two = 3. > self assert: workingCopy ancestry ancestors size = 1. > self assert: workingCopy ancestry ancestors first = base info. > self assert: workingCopy ancestry stepChildren size = 1. > self assert: workingCopy ancestry stepChildren first = final info. > backported := self snapshot. > [workingCopy backportChangesTo: base info] > on: MCChangeSelectionRequest > do: [:e | e resume: e patch]. > self assert: workingCopy ancestry ancestors size = 1. > self assert: workingCopy ancestry ancestors first = base info. > self assert: workingCopy ancestry stepChildren size = 1. > self assert: workingCopy ancestry stepChildren first = backported info. > ! > > Item was changed: > ----- Method: MCWorkingCopyTest>>testMergeIntoImageWithNoChanges (in category 'tests') ----- > testMergeIntoImageWithNoChanges > + <timeout: 30 "seconds"> > | base revB revA1 | > > self change: #a toReturn: 'a'. > base := self snapshot. > self change: #b toReturn: 'b'. > revB := self snapshot. > > self load: base. > self change: #a toReturn: 'a1'. > revA1 := self snapshot. > > self change: #a toReturn: 'a'. > self snapshot. > self merge: revB. > > self assert: (workingCopy ancestors size = 2) > ! > > Item was changed: > ----- Method: MCWorkingCopyTest>>testMergeIntoUnmodifiedImage (in category 'tests') ----- > testMergeIntoUnmodifiedImage > | base revA | > > + <timeout: 30 "seconds"> > base := self snapshot. > self change: #a toReturn: 'a1'. > revA := self snapshot. > > self load: base. > > self merge: revA. > > self assert: (workingCopy ancestors size = 1) > ! > > Item was changed: > ----- Method: MCWorkingCopyTest>>testOptimizedLoad (in category 'tests') ----- > testOptimizedLoad > + <timeout: 30 "seconds"> > | inst base diffy | > inst := self mockInstanceA. > base := self snapshot. > self change: #one toReturn: 2. > self assert: inst one = 2. > diffy := self snapshot asDiffAgainst: base. > self deny: diffy canOptimizeLoading. > self load: base. > self assert: inst one = 1. > self assert: diffy canOptimizeLoading. > self load: diffy. > self assert: inst one = 2. > ! > > Item was changed: > ----- Method: MCWorkingCopyTest>>testSelectiveBackport (in category 'tests') ----- > testSelectiveBackport > + <timeout: 30 "seconds"> > | inst base intermediate final | > inst := self mockInstanceA. > base := self snapshot. > self assert: inst one = 1. > self change: #one toReturn: 2. > intermediate := self snapshot. > self change: #two toReturn: 3. > final := self snapshot. > [workingCopy backportChangesTo: base info] > on: MCChangeSelectionRequest > do: [:e | | selected patch | > patch := e patch. > selected := patch operations select: [:ea | ea definition selector = #two]. > e resume: (MCPatch operations: selected)]. > self assert: inst one = 1. > self assert: inst two = 3. > self assert: workingCopy ancestry ancestors size = 1. > self assert: workingCopy ancestry ancestors first = base info. > self assert: workingCopy ancestry stepChildren size = 1. > self assert: workingCopy ancestry stepChildren first = final info! > > Item was changed: > ----- Method: MCWorkingCopyTest>>testSimpleMerge (in category 'tests') ----- > testSimpleMerge > + <timeout: 30 "seconds"> > | mother base inst | > inst := self mockInstanceA. > base := self snapshot. > self change: #one toReturn: 2. > mother := self snapshot. > self load: base. > self change: #two toReturn: 3. > self snapshot. > self assert: inst one = 1. > self assert: inst two = 3. > > self merge: mother. > self assert: inst one = 2. > self assert: inst two = 3.! > > |
cc: squeak-dev
On Sun, Mar 15, 2015 at 3:21 PM, Chris Muller <[hidden email]> wrote: > On Sun, Mar 15, 2015 at 2:08 PM, Chris Muller <[hidden email]> wrote: >> Do test timeouts add any value, or do they only subtract value by >> forcing humans to research non-problems only to discover the timeout >> value needs to be tweaked? Is there a payoff to continue doing that? > > I know these timeouts are supposed to solve the case that if some code > is changed to cause one a Test to get stuck in a loop, then the test > will fail after the timeout rather than sitting and spinning in the > Jenkins server forever. > > But whether Jenkins reports a timeout, or reports a crash due to a > stack overflow, or stops producing reports at all because its > spinning; each of these cases requires some kind of human > intervention. Its just that with the individual timeouts solution, > not only are the humans required to intervene when there isn't really > a problem, but such intervention even involves making the code itself > bear a cost too. > > It seems like one 5-minute timeout handler hard-coded at the top would > handle the case equally sufficiently..? 5 minutes is ample long > enough for most any regular test, while short enough to "wait" for > output from Jenkins.. |
Free forum by Nabble | Edit this page |