Clean up gc tests
This fixes the additional issues brought up in #3179.
This commit is contained in:
parent
e3ceee2dce
commit
62c12d2161
@ -10,7 +10,7 @@ var http = require('http'),
|
|||||||
done = 0,
|
done = 0,
|
||||||
count = 0,
|
count = 0,
|
||||||
countGC = 0,
|
countGC = 0,
|
||||||
todo = 18,
|
todo = 500,
|
||||||
common = require('../common.js'),
|
common = require('../common.js'),
|
||||||
assert = require('assert'),
|
assert = require('assert'),
|
||||||
PORT = common.PORT;
|
PORT = common.PORT;
|
||||||
@ -45,8 +45,11 @@ function afterGC(){
|
|||||||
countGC ++;
|
countGC ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var timer;
|
||||||
function statusLater() {
|
function statusLater() {
|
||||||
setTimeout(status, 1);
|
gc();
|
||||||
|
if (timer) clearTimeout(timer);
|
||||||
|
timer = setTimeout(status, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function status() {
|
function status() {
|
||||||
|
@ -11,7 +11,7 @@ var http = require('http'),
|
|||||||
done = 0,
|
done = 0,
|
||||||
count = 0,
|
count = 0,
|
||||||
countGC = 0,
|
countGC = 0,
|
||||||
todo = 18,
|
todo = 500,
|
||||||
common = require('../common.js'),
|
common = require('../common.js'),
|
||||||
assert = require('assert'),
|
assert = require('assert'),
|
||||||
PORT = common.PORT;
|
PORT = common.PORT;
|
||||||
@ -49,8 +49,11 @@ function afterGC(){
|
|||||||
countGC ++;
|
countGC ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var timer;
|
||||||
function statusLater() {
|
function statusLater() {
|
||||||
setTimeout(status, 1);
|
gc();
|
||||||
|
if (timer) clearTimeout(timer);
|
||||||
|
timer = setTimeout(status, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function status() {
|
function status() {
|
||||||
|
@ -13,7 +13,7 @@ var http = require('http'),
|
|||||||
done = 0,
|
done = 0,
|
||||||
count = 0,
|
count = 0,
|
||||||
countGC = 0,
|
countGC = 0,
|
||||||
todo = 18,
|
todo = 500,
|
||||||
common = require('../common.js'),
|
common = require('../common.js'),
|
||||||
assert = require('assert'),
|
assert = require('assert'),
|
||||||
PORT = common.PORT;
|
PORT = common.PORT;
|
||||||
@ -52,8 +52,11 @@ function afterGC(){
|
|||||||
countGC ++;
|
countGC ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var timer;
|
||||||
function statusLater() {
|
function statusLater() {
|
||||||
setTimeout(status, 1);
|
gc();
|
||||||
|
if (timer) clearTimeout(timer);
|
||||||
|
timer = setTimeout(status, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function status() {
|
function status() {
|
||||||
|
@ -10,7 +10,7 @@ var http = require('http'),
|
|||||||
done = 0,
|
done = 0,
|
||||||
count = 0,
|
count = 0,
|
||||||
countGC = 0,
|
countGC = 0,
|
||||||
todo = 5,
|
todo = 500,
|
||||||
common = require('../common.js'),
|
common = require('../common.js'),
|
||||||
assert = require('assert'),
|
assert = require('assert'),
|
||||||
PORT = common.PORT;
|
PORT = common.PORT;
|
||||||
@ -47,8 +47,11 @@ function afterGC(){
|
|||||||
countGC ++;
|
countGC ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var timer;
|
||||||
function statusLater() {
|
function statusLater() {
|
||||||
setTimeout(status, 1);
|
gc();
|
||||||
|
if (timer) clearTimeout(timer);
|
||||||
|
timer = setTimeout(status, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function status() {
|
function status() {
|
||||||
@ -61,3 +64,4 @@ function status() {
|
|||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ var net = require('net'),
|
|||||||
done = 0,
|
done = 0,
|
||||||
count = 0,
|
count = 0,
|
||||||
countGC = 0,
|
countGC = 0,
|
||||||
todo = 18,
|
todo = 500,
|
||||||
common = require('../common.js'),
|
common = require('../common.js'),
|
||||||
assert = require('assert'),
|
assert = require('assert'),
|
||||||
PORT = common.PORT;
|
PORT = common.PORT;
|
||||||
@ -36,7 +36,7 @@ function getall() {
|
|||||||
|
|
||||||
count++;
|
count++;
|
||||||
weak(req, afterGC);
|
weak(req, afterGC);
|
||||||
})()
|
})();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,8 +44,11 @@ function afterGC(){
|
|||||||
countGC ++;
|
countGC ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var timer;
|
||||||
function statusLater() {
|
function statusLater() {
|
||||||
setTimeout(status, 1);
|
gc();
|
||||||
|
if (timer) clearTimeout(timer);
|
||||||
|
timer = setTimeout(status, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function status() {
|
function status() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user