Skip to content

Commit 1846c5c

Browse files
committed
edit tests
1 parent 1b45b01 commit 1846c5c

23 files changed

+7
-45
lines changed

lib/Watcher.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ module.exports = function ClusterMode(God) {
103103
},
104104

105105
God.watch.disable = function(pm2_env) {
106-
console.log(JSON.stringify(require('fclone')(pm2_env.pm_id)))
107106
var watcher = God.watch._watchers[pm2_env.pm_id]
108107
if (watcher) {
109108
console.log('[Watch] Stop watching', pm2_env.name);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
"pm2-axon-rpc": "0.5.0",
174174
"pm2-deploy": "^0.3.8",
175175
"pm2-multimeter": "^0.1.2",
176-
"pmx": "keymetrics/pmx#development",
176+
"pmx": "latest",
177177
"semver": "^5.3",
178178
"shelljs": "0.7.8",
179179
"source-map-support": "^0.4.18",

test/interface/bus.fork.spec.mocha.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ process.on('uncaughtException', function(e) {
5757
});
5858

5959
describe('PM2 BUS / RPC', function() {
60-
this.timeout(5000);
61-
6260
var pm2 = new PM2.custom({
6361
independent : true,
6462
cwd : __dirname + '/../fixtures/interface'

test/interface/bus.spec.mocha.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ process.on('uncaughtException', function(e) {
5959
});
6060

6161
describe('PM2 BUS / RPC', function() {
62-
this.timeout(5000);
63-
6462
var pm2 = new PM2.custom({
6563
independent : true,
6664
cwd : __dirname + '/../fixtures/interface'

test/interface/exception.e2e.mocha.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ function listenRev(cb) {
2323
}
2424

2525
describe('Programmatically test interactor', function() {
26-
this.timeout(8000);
2726
var pm2;
2827

2928
before(function(done) {

test/interface/interactor.connect.mocha.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ function createMockServer(cb) {
6868
}
6969

7070
describe('Interactor testing', function() {
71-
this.timeout(5000);
72-
7371
var server;
7472
var interactor;
7573
var pm2_bus;

test/interface/mocha.opts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--timeout 5000
1+
--timeout 25000

test/interface/pm2.link.check.mocha.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ var should = require('should');
77

88
describe('PM2 link variable checks', function() {
99
var server;
10-
this.timeout(5000);
1110

1211
describe('km_link false', function() {
1312
var pm2 = new PM2.custom({

test/interface/request.mocha.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ describe('Http requests', function() {
6666
});
6767

6868
it('should timeout after 7secs', function(done) {
69-
this.timeout(10000);
7069
HttpRequest.post({
7170
port : PORT,
7271
url : '127.0.0.1',

test/interface/scoped_pm2_actions.mocha.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ var pm2 = new PM2.custom({
8383
describe('SCOPED PM2 ACTIONS', function() {
8484
var server;
8585
var interactor;
86-
this.timeout(5000);
86+
8787
after(function(done) {
8888
server.close();
8989
pm2.destroy(done);

test/mocha.opts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--timeout 5000
1+
--timeout 25000

test/programmatic/api.mocha.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ var PM2 = require('../..');
55
var should = require('should');
66

77
describe('API checks', function() {
8-
this.timeout(5000);
9-
108
describe('PM2 API case#1', function() {
119
before(function(done) {
1210
PM2.delete('all', function() { done() });
@@ -318,7 +316,6 @@ describe('API checks', function() {
318316
});
319317

320318
it('Should start up modules', function(done) {
321-
this.timeout(5000);
322319
PM2.connect(true, function(err) {
323320
should(err).be.null();
324321

test/programmatic/cluster.mocha.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ var Plan = require('../helpers/plan.js');
99
process.chdir(__dirname);
1010

1111
describe('Cluster programmatic tests', function() {
12-
this.timeout(5000);
13-
1412
var pm2 = new PM2.custom({
1513
cwd : '../fixtures',
1614
independent : true

test/programmatic/custom_action.mocha.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ var pm2 = require('../..');
55
var should = require('should');
66

77
describe('Custom actions via CLI/API', function() {
8-
this.timeout(10000);
9-
108
after(function(done) {
119
pm2.kill(done);
1210
});

test/programmatic/god.mocha.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,23 +187,19 @@ describe('God', function() {
187187
});
188188

189189
describe('Multi launching', function() {
190-
191190
before(function(done) {
192191
deleteAll({}, function(err, dt) {
193192
done();
194193
});
195194
});
196195

197196
afterEach(function(done) {
198-
this.timeout(5000);
199197
deleteAll({}, function(err, dt) {
200198
done();
201199
});
202200
});
203201

204202
it('should launch multiple processes depending on CPUs available', function(done) {
205-
this.timeout(5000);
206-
207203
God.prepare(Common.prepareAppConf({cwd : process.cwd() }, {
208204
script : '../fixtures/echo.js',
209205
name : 'child',

test/programmatic/graceful.mocha.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ var semver = require('semver');
1010
process.chdir(__dirname);
1111

1212
describe('Wait ready / Graceful start / restart', function() {
13-
this.timeout(5000);
14-
1513
if (!semver.satisfies(process.version, '>= 4.0.0'))
1614
process.exit(0);
1715

test/programmatic/logs.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ var fs = require('fs');
77
var path = require('path');
88

99
describe('Programmatic log feature test', function() {
10-
1110
var proc1 = null;
1211
var procs = [];
1312

@@ -16,8 +15,6 @@ describe('Programmatic log feature test', function() {
1615
});
1716

1817
before(function(done) {
19-
this.timeout(5000);
20-
2118
pm2.delete('all', function() {
2219
done();
2320
});

test/programmatic/max_memory_limit.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ var path = require('path');
99
// Change to current folder
1010

1111
describe('Max memory restart programmatic', function() {
12-
this.timeout(10000);
13-
1412
var proc1 = null;
1513
var procs = [];
1614
var pm2 = new PM2.custom({

test/programmatic/mocha.opts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--timeout 5000
1+
--timeout 25000

test/programmatic/programmatic.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,16 @@ var should = require('should');
99
var path = require('path');
1010

1111
describe('PM2 programmatic calls', function() {
12-
this.timeout(10000);
13-
1412
var proc1 = null;
1513
var procs = [];
1614
var bus = null;
1715

1816
var pm2 = new PM2.custom({
19-
cwd : __dirname + '/../fixtures',
20-
independent : true
17+
cwd : __dirname + '/../fixtures'
2118
});
2219

2320
after(function(done) {
24-
pm2.destroy(done);
21+
pm2.kill(done);
2522
});
2623

2724
before(function(done) {
@@ -152,7 +149,6 @@ describe('PM2 programmatic calls', function() {
152149
});
153150

154151
it('should delete processes', function(done) {
155-
this.timeout(5000);
156152
pm2.delete('all', function(err, ret) {
157153
should(err).be.null()
158154
pm2.list(function(err, ret) {

test/programmatic/reload-locker.mocha.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ var cst = require('../../constants.js');
1313
process.chdir(__dirname);
1414

1515
describe('Reload locker system', function() {
16-
this.timeout(5000);
17-
1816
var pm2 = new PM2.custom({
1917
cwd : '../fixtures'
2018
});

test/programmatic/signals.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ var should = require('should');
44
var path = require('path');
55

66
describe('Signal kill (+delayed)', function() {
7-
this.timeout(10000);
8-
97
var proc1 = null;
108

119
var pm2 = new PM2.custom({

test/programmatic/watcher.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ describe('Watcher', function() {
5151
cwd : __dirname + '/../fixtures/watcher'
5252
});
5353

54-
this.timeout(2500)
55-
5654
after(function(cb) {
5755
pm2.destroy(function() {
5856
fs.unlink(paths.server, cb)

0 commit comments

Comments
 (0)