From ea5b735573dcf2563ac86afdd5a9de7f7f473cef Mon Sep 17 00:00:00 2001 From: Alban <49032546+sonibla@users.noreply.github.com> Date: Tue, 18 Jan 2022 15:03:47 +0100 Subject: [PATCH] Better exception handling in TWRunner Notifications are already managed in doExecuteTestCaseMessage:, we only need to handle Exception - Notification in doRunTestMessage: --- src/TestWorkers-Worker/TWRunner.class.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TestWorkers-Worker/TWRunner.class.st b/src/TestWorkers-Worker/TWRunner.class.st index 2b13fdd..2ab52a9 100644 --- a/src/TestWorkers-Worker/TWRunner.class.st +++ b/src/TestWorkers-Worker/TWRunner.class.st @@ -34,7 +34,7 @@ TWRunner >> doExecuteTestCaseMessage: testMessage [ during: [ [ testResults executingContext: thisContext. testMessage buildSuite run: testResults ] - on: Notification do: [ :e | e resume. ] ]. + on: Notification do: [ :e | e pass ] ]. ^ testResults ] @@ -44,7 +44,7 @@ TWRunner >> doRunTestMessage: aTWMessage [ self traceTestMessage: aTWMessage. ^ [ self executionResponseOf: aTWMessage withResult: (self doExecuteTestCaseMessage: aTWMessage) ] - on: Exception + on: Exception - Notification do: [ :anError | self executionErrorResponseOf: aTWMessage withError: anError ] ]