【发布时间】:2017-06-28 21:47:29
【问题描述】:
由于长时间运行的 $http 请求超时,我的 e2e 测试失败。出现以下错误: 以下任务待处理: - $http:...... ScriptTimeoutError: 异步脚本超时: 10 秒内未收到结果。
根据 https://github.com/angular/protractor/issues/169
,我已使用 $interval 服务在我的 Angular 代码中进行 http 调用以解决此类问题但量角器仍然因上述错误而失败。 我正在使用角度 1.6.x 和量角器 5.x。
谁能帮帮我?
【问题讨论】:
-
我使用事件流和 http requetss 的 Angular 应用程序永远不会关闭,因此量角器会超时。我使用 $interval 来包装我长时间运行的 http 请求,但对于长时间运行的任务,量角器仍然超时。
标签: angularjs protractor