Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions test/pummel/test-keep-alive.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@

// This test requires the program 'wrk'
const common = require('../common');
if (common.isWindows)
common.skip('no `wrk` on windows');

const child_process = require('child_process');
const result = child_process.spawnSync('wrk', ['-h']);
if (result.error && result.error.code === 'ENOENT')
common.skip('test requires `wrk` to be installed first');

const assert = require('assert');
const spawn = require('child_process').spawn;
const http = require('http');
const url = require('url');

Expand Down Expand Up @@ -60,7 +62,7 @@ const runAb = (opts, callback) => {
args.push(url.format({ hostname: '127.0.0.1',
port: common.PORT, protocol: 'http' }));

const child = spawn('wrk', args);
const child = child_process.spawn('wrk', args);
child.stderr.pipe(process.stderr);
child.stdout.setEncoding('utf8');

Expand Down