14 - fix creationConnection with tcp://host:port failing
This commit is contained in:
parent
52dee3584e
commit
3acfaafb2a
|
@ -56,7 +56,7 @@ function createFromTcpEndpoint(settings, tcpEndpoint, connectionName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function createFromStringEndpoint(settings, endPoint, connectionName) {
|
function createFromStringEndpoint(settings, endPoint, connectionName) {
|
||||||
var m = endPoint.match(/^(tcp|discover):\/\/([^:]):?(\d+)?$/);
|
var m = endPoint.match(/^(tcp|discover):\/\/([^:]+):?(\d+)?$/);
|
||||||
if (!m) throw new Error('endPoint string must be tcp://hostname[:port] or discover://dns[:port]');
|
if (!m) throw new Error('endPoint string must be tcp://hostname[:port] or discover://dns[:port]');
|
||||||
var scheme = m[1];
|
var scheme = m[1];
|
||||||
var hostname = m[2];
|
var hostname = m[2];
|
||||||
|
|
|
@ -41,6 +41,11 @@ module.exports = {
|
||||||
test.ok(reason.indexOf("Reconnection limit reached") === 0, "Wrong expected reason.");
|
test.ok(reason.indexOf("Reconnection limit reached") === 0, "Wrong expected reason.");
|
||||||
test.done();
|
test.done();
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
'Create a connection with tcp://host:port string': function(test) {
|
||||||
|
var conn = client.createConnection({}, 'tcp://localhost:2113');
|
||||||
|
conn.close();
|
||||||
|
test.done();
|
||||||
}/*,
|
}/*,
|
||||||
'Connect to Cluster using gossip seeds': function (test) {
|
'Connect to Cluster using gossip seeds': function (test) {
|
||||||
test.expect(1);
|
test.expect(1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user