18 - Changing all hostname to host, fixing some async issues in tests

This commit is contained in:
Nicolas Dextraze
2017-01-28 18:04:58 -08:00
parent f97b7fff8e
commit 006b5b4791
29 changed files with 246 additions and 90 deletions

View File

@ -6,9 +6,9 @@ var settings = {
log: new client.FileLogger('./simple-verbose.log')
};
var gossipSeeds = [
new client.GossipSeed({hostname: 'localhost', port: 1113}),
new client.GossipSeed({hostname: 'localhost', port: 2113}),
new client.GossipSeed({hostname: 'localhost', port: 3113})
new client.GossipSeed({host: '192.168.33.10', port: 2113}),
new client.GossipSeed({host: '192.168.33.11', port: 2113}),
new client.GossipSeed({host: '192.168.33.12', port: 2113})
];
var conn = client.createConnection(settings, gossipSeeds);
conn.connect()

View File

@ -5,7 +5,7 @@ var uuid = require('uuid');
var esConnection = esClient.createConnection({}, {"hostname": "localhost", "port": 1113});
esConnection.connect();
esConnection.once('connected', function (tcpEndPoint) {
console.log('Connected to eventstore at ' + tcpEndPoint.hostname + ":" + tcpEndPoint.port);
console.log('Connected to eventstore at ' + tcpEndPoint.host + ":" + tcpEndPoint.port);
var userId = uuid.v4();
// This event could happen as a result of (e.g.) a 'CreateUser(id, username, password)' command.
var userCreatedEvent = {

View File

@ -9,7 +9,7 @@ const resolveLinkTos = false;
var esConnection = esClient.createConnection({}, {"hostname": "localhost", "port": 1113});
esConnection.connect();
esConnection.once('connected', function (tcpEndPoint) {
console.log('Connected to eventstore at ' + tcpEndPoint.hostname + ":" + tcpEndPoint.port);
console.log('Connected to eventstore at ' + tcpEndPoint.host + ":" + tcpEndPoint.port);
esConnection.subscribeToAll(resolveLinkTos, eventAppeared, subscriptionDropped, credentialsForAllEventsStream)
.then(function(subscription) {
console.log("subscription.isSubscribedToAll: " + subscription.isSubscribedToAll);

View File

@ -9,7 +9,7 @@ const credentialsForAllEventsStream = new esClient.UserCredentials("admin", "cha
var esConnection = esClient.createConnection({}, {"hostname": "localhost", "port": 1113});
esConnection.connect();
esConnection.once('connected', function (tcpEndPoint) {
console.log('Connected to eventstore at ' + tcpEndPoint.hostname + ":" + tcpEndPoint.port);
console.log('Connected to eventstore at ' + tcpEndPoint.host + ":" + tcpEndPoint.port);
var subscription = esConnection.subscribeToAllFrom(null, true, eventAppeared, liveProcessingStarted, subscriptionDropped, credentialsForAllEventsStream);
console.log("subscription.isSubscribedToAll: " + subscription.isSubscribedToAll);
});