2017-04-21 84 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(); 
    } 
}