[squeak-dev] The Trunk: SUnit-ar.76.mcz

Chris Muller asqueaker at gmail.com
Thu May 13 22:44:12 UTC 2010


> >From one side, putting a small default timeout, motivates a tests
> author to write tests which run fast
> (so, you can expect to get a test results during your lifetime).

I can almost imagine a context for a hard-limit timeout:  a hard-limit
might be useful for Squeak trunk development.  For testing a Smalltalk
system, tests are low-level, low-volume, and really really should be
brief, both to encourage trunk development and frequent running of the
tests.  I think everyone here agrees, no test should run any longer
than it needs to.  But a new community member might not know that and
write a really long test and disrupt running of tests for others..?

>   self usesTimeouts ifTrue: [
>       [[self setUp. self performTest] ensure: [self tearDown]]
>               valueWithin: self timeoutForTest seconds
>               onTimeout:[TestFailure signal: 'Test timed out'].
>   ]
>  ifFalse: [  self setUp. self performTest] ensure: [self tearDown]

My main interest is in preserving my TestCase code-base, which is
currently running in 3.9 thru trunk, and Pharo 1.0, without having to
modify a lot of methods.  I saw the pragma code and totally glossed
over the fact that, if the pragma isn't there, it just uses
defaultTimeout which I am content to override with a value of "500
days asSeconds" rather than introduce an additional boolean..  False
alarm, sorry!  :-s

Regards,
  Chris



More information about the Squeak-dev mailing list