首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Stryker初始运行超时

Stryker初始运行超时
EN

Stack Overflow用户
提问于 2021-06-25 04:10:08
回答 1查看 115关注 0票数 0

简单地运行"stryker run",突变正在产生,一切似乎都运行得很顺利,直到我收到预演失败的错误:

代码语言:javascript
复制
22:19:29 (12628) DEBUG JestTestRunner Running jest with --findRelatedTests flag. Set jest.enableFindRelatedTests to false to run all tests on every mutant.
22:24:17 (9652) DEBUG TimeoutDecorator Timeout expired, restarting the process and reporting timeout
22:24:19 (9652) DEBUG ChildProcessProxy Disposing of worker process 12952
22:24:21 (9652) DEBUG ChildProcessProxy Kill 12952
22:24:26 (9652) DEBUG ChildProcessProxy Started ChildProcessTestRunnerWorker in child process 20336
22:24:38 (9652) ERROR DryRunExecutor Initial test run timed out!
22:24:38 (9652) DEBUG Stryker Not removing the temp dir because an error occurred
22:24:38 (9652) ERROR Stryker Unexpected error occurred while running Stryker Error: Something went wrong in the initial test run
    at DryRunExecutor.validateResultCompleted (C:\Users\avalchev\IdeaProjects\project\node_modules\@stryker-mutator\core\dist\src\process\3-dry-run-executor.js:61:15)
    at DryRunExecutor.timeDryRun (C:\Users\avalchev\IdeaProjects\project\node_modules\@stryker-mutator\core\dist\src\process\3-dry-run-executor.js:71:14)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async C:\Users\avalchev\IdeaProjects\project\node_modules\@stryker-mutator\core\dist\src\concurrent\pool.js:62:28

请记住,当我的配置为真时,我收到的是Set jest.enableFindRelatedTests to false。如果我将其设置为false,调试器会说将jest.enableFindRelatedTests设置为true。这就是为什么我把它一起删除的原因。

这是我的配置:

代码语言:javascript
复制
/**
 * @type {import('@stryker-mutator/api/core').StrykerOptions}
 */
module.exports = {
  _comment:
     "This config was generated using 'stryker init'. Please see the guide for more information: https://stryker-mutator.io/docs/stryker-js/guides/angular",
  mutate: [
    "*/.ts",
    "!**/*.spec.ts",
    "!**/*test.ts"
  ],
  testRunner: "jest",
  "jest": {
    "projectType": "custom",
    "configFile": "jest.config.js",
    "config": {
      "testEnvironment": "jest-environment-jsdom-sixteen"
    }
  },
  tempDirName: "stryker-tmp",
  reporters: ["progress", "clear-text", "html"],
  concurrency: 4,
  concurrency_comment:
     "Recommended to use about half of your available cores when running stryker with angular",
  coverageAnalysis: "perTest",
};
EN

回答 1

Stack Overflow用户

发布于 2021-06-25 22:37:03

在Stryker配置文件中,我添加了timeoutMS设置,以增加每个测试使用的时间。我将其设置为30秒(30000)。

代码语言:javascript
复制
timeoutMS: 30000   // Use extended timeoutMs for test run to remove Time Out Results
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68122213

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档