Workaround for (presumably) race in TestReport jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 13 Feb 2017 12:00:51 +0100
branchjv
changeset 3253bd7d9ad8b3f
parent 323 8ec01ca33d6e
child 326 7a039308efa5
Workaround for (presumably) race in TestReport

On SWING CI, sometimes when test times out, the whole
test run crashes on DNU as `outcome` instvar is nil.
This is maybe because of some race.

As a quick and dirty workaround, create a new one if
outcome is nil. Proper solution is to revise the code
and figure out what's wrong, indeed. This is left as
future work.
reports/Builder__TestReport.st
     1.1 --- a/reports/Builder__TestReport.st	Mon Dec 05 06:48:09 2016 +0100
     1.2 +++ b/reports/Builder__TestReport.st	Mon Feb 13 12:00:51 2017 +0100
     1.3 @@ -516,6 +516,7 @@
     1.4      etime := OperatingSystem getMillisecondTime.
     1.5      timeouted ifTrue:[
     1.6          error := TimeoutError new messageText: ('Timed out (effective %1ms, base %2ms, scale %3)' bindWith: timeout with: timeoutBase with:TimeoutScale) .
     1.7 +	outcome isNil ifTrue:[ outcome := self createOutcome ].
     1.8          outcome result: TestResult stateError.
     1.9          format 
    1.10              writeTestCase: aTestCase outcome: outcome