private launchConf() { /** * Start Express server. */ const server = http.createServer(); const wss = new WSServer({server}); server.on('request', this.express); wss.on('connection', wsHandler); server.listen(this.express.get('port'), () => { // tslint:disable-next-line:no-console console.log((' App is running at http://localhost:%d \ in %s mode'), this.express.get('port'), this.express.get('env')); // tslint:disable-next-line:no-console console.log(' Press CTRL-C to stop'); }) .setTimeout(600000); }
}) setTimeout(function () { t.ok(timedout, 'should have closed socket') t.ok(closeEvent, 'res should emit close event') }) server.setTimeout(100)
setTimeout(function () { res.end('Hello World') }, (agent._conf.abortedErrorThreshold * 1000) / 2 + 100) }) server.setTimeout((agent._conf.abortedErrorThreshold * 1000) / 2)
setTimeout(function () { t.ok(timedout, 'should have closed socket') t.notOk(ended, 'should not have ended transaction') }) server.setTimeout((agent._conf.abortedErrorThreshold * 1000) + 10)
socket.setTimeout(timeout)
setTimeout(function () { t.ok(timedout, 'should have closed socket') t.notOk(ended, 'should not have ended transaction') }) server.setTimeout((agent._conf.abortedErrorThreshold * 1000) / 2)
server.setTimeout(0); server.listen(config.ports.http, function () { console.log('[Server] Listening on %d waiting for listeners.', config.ports.http);
setTimeout(function () { t.ok(timedout, 'should have closed socket') t.notOk(ended, 'should not have ended transaction') }) server.setTimeout((agent._conf.abortedErrorThreshold * 1000) / 2)
}) setTimeout(function () { t.ok(timedout, 'should have closed socket') t.ok(closeEvent, 'res should emit close event') res.end('Hello World') setTimeout(function () { t.strictEqual(agent._transport._writes.length, 1, 'should not send transactions') server.close() }) server.setTimeout(100)
setTimeout(function () { t.ok(timedout, 'should have closed socket') t.notOk(ended, 'should have ended transaction') }) server.setTimeout((agent._conf.abortedErrorThreshold * 1000) + 50)
setTimeout(function () { res.end('Hello World') }, (agent._conf.abortedErrorThreshold * 1000) + 100) }) server.setTimeout((agent._conf.abortedErrorThreshold * 1000) + 10)