Skip to content

Commit

Permalink
Update getTestServerStripe to use an agent that does not keep connect…
Browse files Browse the repository at this point in the history
…ions alive.
  • Loading branch information
dcr-stripe committed Aug 13, 2021
1 parent ca74ca9 commit eabc505
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions testUtils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const http = require('http');

const ResourceNamespace = require('../lib/ResourceNamespace').ResourceNamespace;

const testingHttpAgent = new http.Agent({keepAlive: false});

const utils = (module.exports = {
getTestServerStripe: (clientOptions, handler, callback) => {
const server = http.createServer((req, res) => {
Expand All @@ -28,6 +30,7 @@ const utils = (module.exports = {
host: 'localhost',
port,
protocol: 'http',
httpAgent: testingHttpAgent,
...clientOptions,
}
);
Expand Down

0 comments on commit eabc505

Please sign in to comment.