From 88b977fcada5d08ae8d5bba9bc8eefc8404eff82 Mon Sep 17 00:00:00 2001 From: johnjbarton Date: Thu, 26 Jul 2018 08:26:59 -0700 Subject: [PATCH] fix(config): wait 20s for browser activity. (#3087) On low-horsepower CI systems karma frequently times out waiting for phantomjs. We see this in our Travis-CI runs. Users also see it: https://github.com/karma-runner/karma-phantomjs-launcher/issues/126. --- docs/config/01-configuration-file.md | 4 ++-- lib/config.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/config/01-configuration-file.md b/docs/config/01-configuration-file.md index 02ab11bdb..656d3bf03 100644 --- a/docs/config/01-configuration-file.md +++ b/docs/config/01-configuration-file.md @@ -156,7 +156,7 @@ a flaky network link between the Karma server and the browsers. ## browserNoActivityTimeout **Type:** Number -**Default:** `10000` +**Default:** `20000` **Description:** How long will Karma wait for a message from a browser before disconnecting from it (in ms). @@ -581,7 +581,7 @@ Note: Using `'https:'` requires you to specify `httpsServerOptions`. **Description:** Module used for Karma webserver. -Uses the provided module instead of node's built in `http` or `https` module. The module loaded here must exactly match the interface of node's http module. This can be useful for loading in a module like `node-http2` to allow for http2 support. +Uses the provided module instead of node's built in `http` or `https` module. The module loaded here must exactly match the interface of node's http module. This can be useful for loading in a module like `node-http2` to allow for http2 support. Note: if you're using this to enable `http2` you must also set the `protocol` to `https:` and specify certificates as http2 can only run of https. diff --git a/lib/config.js b/lib/config.js index 488ae41fe..f446defb6 100644 --- a/lib/config.js +++ b/lib/config.js @@ -343,7 +343,7 @@ class Config { } this.browserDisconnectTimeout = 2000 this.browserDisconnectTolerance = 0 - this.browserNoActivityTimeout = 10000 + this.browserNoActivityTimeout = 20000 this.processKillTimeout = 2000 this.concurrency = Infinity this.failOnEmptyTestSuite = true