【问题标题】:Codeception - How do I change out the request timeout?Codeception - 如何更改请求超时?
【发布时间】:2017-04-21 13:22:02
【问题描述】:

当我尝试更改超时时,我收到以下错误:

致命错误:调用未定义的方法 Robofile::task() in /Users/.../automated-customer-tests/.../vendor/codeception/robo-paracept/src/MergeReports.php 在第 12 行错误:调用未定义的方法 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]
进程“vendor/bin/robo parallel:all”超过了 300 的超时 秒。

【问题讨论】:

    标签: php codeception


    【解决方案1】:

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

    class RoboFile extends \Robo\Tasks
    {
    
        function test()
        {
            $this->taskParallelExec()
                ->timeout(400)
                ->process('sleep 500')
                ->process('sleep 500')
                ->process('sleep 404')
                ->run();
        }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-04
      • 1970-01-01
      • 1970-01-01
      • 2021-09-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多