2017-04-21 54 views
0

当我试图改变超时,我得到以下错误:Codeception - 如何更改请求超时?

Fatal error: Call to undefined method Robofile::task() in /Users/.../automated-customer-tests/.../vendor/codeception/robo-paracept/src/MergeReports.php on line 12 ERROR: Call to undefined method Robofile::task() in /Users/.../automated-customer-tests/.../vendor/codeception/robo-paracept/src/MergeReports.php:12

脚本vendor/bin/robo parallel:all处理并行事件与返回错误代码255

但是,如果我不能运行并行测试,因为它继续超时,并出现以下错误:

[Symfony\Component\Process\Exception\ProcessTimedOutException]
The process "vendor/bin/robo parallel:all" exceeded the timeout of 300 seconds.

回答

0

使用超时方法来改变超时值:

class RoboFile extends \Robo\Tasks 
{ 

    function test() 
    { 
     $this->taskParallelExec() 
      ->timeout(400) 
      ->process('sleep 500') 
      ->process('sleep 500') 
      ->process('sleep 404') 
      ->run(); 
    } 
}