Update npm tests & config to pass in Windows. (RIPD-209)

* Extend timeout for WebSocket test.
* Windows networking doesn't like connecting to 0.0.0.0. Use 127.0.0.1
* Additional command line options in config. Can potentially be used to run rippled in a debugger.
This commit is contained in:
Edward Hennis
2014-08-19 11:59:07 -04:00
committed by Tom Ritchford
parent 2b69ded1ea
commit 6fc136ae9a
3 changed files with 12 additions and 4 deletions

View File

@@ -27,9 +27,9 @@ exports.servers = {
'websocket_port': 5006,
'websocket_ssl': false,
'trusted' : true,
// "peer_ip" : "0.0.0.0",
// "peer_ip" : "127.0.0.1",
// "peer_port" : 51235,
'rpc_ip' : "0.0.0.0",
'rpc_ip' : "127.0.0.1",
'rpc_port' : 5005,
'local_sequence' : true,
'trace' : false,

View File

@@ -87,11 +87,15 @@ Server.prototype.set_ledger_file = function(fn) {
Server.prototype._serverSpawnSync = function() {
var self = this;
var path = this.config.rippled_path;
var args = [
"-a",
"-v",
"--conf=rippled.cfg"
];
if (this.config.rippled_args) {
args = this.config.rippled_args.concat(args);
};
if (this.ledger_file != null) {
args.push('--ledgerfile=' + this.ledger_file)
@@ -104,7 +108,7 @@ Server.prototype._serverSpawnSync = function() {
};
// Spawn in standalone mode for now.
this.child = child.spawn(this.config.rippled_path, args, options);
this.child = child.spawn(path, args, options);
if (!this.quiet)
console.log("server: start %s: %s --conf=%s",

View File

@@ -33,7 +33,11 @@ suite('WebSocket connection', function() {
});
test('WebSocket connect and disconnect', function(done) {
this.timeout(2000);
// This timeout probably doesn't need to be this long, because
// the test itself completes in less than half a second.
// However, some of the overhead, especially on Windows can
// push the measured time out this far.
this.timeout(3000);
var alpha = Remote.from_config("alpha");