Add three more pummel tests

Reviewed-by: asquare
This commit is contained in:
Kinsley Wong 2013-11-15 08:46:36 -08:00
parent df86178a4a
commit d3be122ab1
4 changed files with 38 additions and 0 deletions

View File

@ -339,8 +339,10 @@
<!-- benchmark -->
<apply-diff src="benchmark" mod="${benchmark.dir}" name="common.js"/>
<!-- pummel -->
<apply-diff src="test/pummel" mod="${test.dir}/pummel" name="test-exec.js"/>
<apply-diff src="test/pummel" mod="${test.dir}/pummel" name="test-net-pingpong.js"/>
<apply-diff src="test/pummel" mod="${test.dir}/pummel" name="test-net-throttle.js"/>
<apply-diff src="test/pummel" mod="${test.dir}/pummel" name="test-process-uptime.js"/>
</target>
<!-- keep sorted and synchronized with diff-source-files -->
@ -408,8 +410,10 @@
<!-- benchmark -->
<apply-patch-file target="${benchmark.dir}" dir="benchmark" name="common.js"/>
<!-- pummel -->
<apply-patch-file target="${test.dir}/pummel" dir="test/pummel" name="test-exec.js"/>
<apply-patch-file target="${test.dir}/pummel" dir="test/pummel" name="test-net-pingpong.js"/>
<apply-patch-file target="${test.dir}/pummel" dir="test/pummel" name="test-net-throttle.js"/>
<apply-patch-file target="${test.dir}/pummel" dir="test/pummel" name="test-process-uptime.js"/>
</target>
<target name="generate-policy-file" depends="init">

View File

@ -0,0 +1,20 @@
--- ../nodejs/test/pummel/test-exec.js 2013-11-14 15:21:39.859797900 -0800
+++ test/pummel/test-exec.js 2013-11-14 15:28:27.206661300 -0800
@@ -37,7 +37,7 @@
var error_count = 0;
-exec(process.execPath + ' -p -e process.versions',
+exec(process.execPath + ' --version',
function(err, stdout, stderr) {
if (err) {
error_count++;
@@ -75,7 +75,7 @@
exec(SLEEP3_COMMAND, { timeout: 50 }, function(err, stdout, stderr) {
var diff = (new Date()) - sleeperStart;
console.log('\'sleep 3\' with timeout 50 took %d ms', diff);
- assert.ok(diff < 500);
+ assert.ok(diff < 1000);
assert.ok(err);
assert.ok(err.killed);
assert.equal(err.signal, 'SIGTERM');

View File

@ -0,0 +1,11 @@
--- ../nodejs/test/pummel/test-process-uptime.js 2013-11-14 17:15:27.655719800 -0800
+++ test/pummel/test-process-uptime.js 2013-11-14 17:17:59.412903200 -0800
@@ -26,7 +26,7 @@
var assert = require('assert');
console.error(process.uptime());
-assert.ok(process.uptime() <= 2);
+assert.ok(process.uptime() <= 3);
var original = process.uptime();

View File

@ -40,8 +40,10 @@ source.lib.modules = \
source.test.pummel.list = \
test-child-process-spawn-loop.js \
test-exec.js \
test-fs-largefile.js \
test-fs-watch-file.js \
test-fs-watch-file-slow.js \
test-https-large-response.js \
test-http-upload-timeout.js \
test-net-many-clients.js \
@ -53,6 +55,7 @@ source.test.pummel.list = \
test-net-timeout.js \
test-net-write-callbacks.js \
test-process-hrtime.js \
test-process-uptime.js \
test-regress-GH-814_2.js \
test-regress-GH-814.js \
test-regress-GH-892.js \