Skip to content

Commit

Permalink
[squash] convert test-benchmark-dns
Browse files Browse the repository at this point in the history
  • Loading branch information
maclover7 committed Sep 8, 2017
1 parent 3e5e2e2 commit b3f4c41
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions test/parallel/test-benchmark-dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,9 @@

require('../common');

// Minimal test for dns benchmarks. This makes sure the benchmarks aren't
// horribly broken but nothing more than that.

const assert = require('assert');
const fork = require('child_process').fork;
const path = require('path');

const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js');
const runBenchmark = require('../common/benchmark');

const env = Object.assign({}, process.env,
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });

const child = fork(runjs,
['--set', 'n=1',
'--set', 'all=false',
'--set', 'name=127.0.0.1',
'dns'],
{ env });

child.on('exit', (code, signal) => {
assert.strictEqual(code, 0);
assert.strictEqual(signal, null);
});
runBenchmark('dns', ['n=1', 'all=false', 'name=127.0.0.1'], env);

0 comments on commit b3f4c41

Please sign in to comment.