Skip to content

Commit 732396a

Browse files
authored
fix(travis): Up the socket timeout 2->20s. (#3103)
Log something on all disconnect() calls. Up the timeout as suggested by ndcornelius@ on #3102
1 parent 173848e commit 732396a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

client/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var KARMA_PROXY_PATH = constants.KARMA_PROXY_PATH
1414
var socket = io(location.host, {
1515
reconnectionDelay: 500,
1616
reconnectionDelayMax: Infinity,
17-
timeout: 2000,
17+
timeout: 20000,
1818
path: KARMA_PROXY_PATH + KARMA_URL_ROOT.substr(1) + 'socket.io',
1919
'sync disconnect on unload': true
2020
})

lib/browser.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ class Browser {
151151
}
152152

153153
if (this.state === CONNECTED) {
154-
this.disconnect()
154+
this.disconnect('client disconnected from CONNECTED state')
155155
} else if (this.state === CONFIGURING || this.state === EXECUTING) {
156156
this.log.debug('Disconnected during run, waiting %sms for reconnecting.', this.disconnectDelay)
157157
this.state = EXECUTING_DISCONNECTED
158158

159159
this.pendingDisconnect = this.timer.setTimeout(() => {
160160
this.lastResult.totalTimeEnd()
161161
this.lastResult.disconnected = true
162-
this.disconnect()
162+
this.disconnect(`reconnect failed before timeout of ${this.disconnectDelay}ms`)
163163
this.emitter.emit('browser_complete', this)
164164
}, this.disconnectDelay)
165165

0 commit comments

Comments
 (0)