better error reporting in tests thanks to a modification in the _wakeup method in Task