Skip to content

Commit

Permalink
Run tests on port 18003
Browse files Browse the repository at this point in the history
Port 18003 was chosen at random, but the point is not to use the same
port as PS itself is running on.

This might not be the best approach, but it probably at least beats
running it on the port in config.js and conflicting with an active
PS process.
  • Loading branch information
Zarel committed Mar 3, 2015
1 parent 51b298b commit 8f81cfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app.js
Expand Up @@ -105,6 +105,8 @@ Config.port = cloudenv.get('PORT', Config.port);

if (require.main === module && process.argv[2] && parseInt(process.argv[2])) {
Config.port = parseInt(process.argv[2]);
} else if (global.overridePort) {
Config.port = global.overridePort;
}

global.ResourceMonitor = {
Expand Down
1 change: 1 addition & 0 deletions test/main.js
Expand Up @@ -3,6 +3,7 @@ var assert = require('assert');
before('initialization', function () {
this.timeout(0); // Remove timeout limitation

global.overridePort = 18003;
require('./../app.js');
process.listeners('uncaughtException').forEach(function (listener) {
process.removeListener('uncaughtException', listener);
Expand Down

0 comments on commit 8f81cfa

Please sign in to comment.