aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2015-08-13 11:26:57 -0700
committerGravatar murgatroid99 <mlumish@google.com>2015-08-13 11:26:57 -0700
commit296a369915d126dc53f7fbdd9b4e9d83229e11fa (patch)
treeb94f7e988971feef84bade8173414bc2a654690e
parent371354673f1a16658a3fbd5a04c3dcdf9b7ef30a (diff)
Further fixed connectivity tests
-rw-r--r--src/node/src/client.js2
-rw-r--r--src/node/test/surface_test.js4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/node/src/client.js b/src/node/src/client.js
index 0cd29e5b95..d14713f393 100644
--- a/src/node/src/client.js
+++ b/src/node/src/client.js
@@ -575,7 +575,7 @@ exports.makeClientConstructor = function(methods, serviceName) {
if (err) {
callback(new Error('Failed to connect before the deadline'));
}
- var new_state = this.channel.getConnectivityState(true);
+ var new_state = self.channel.getConnectivityState(true);
if (new_state === grpc.connectivityState.READY) {
callback();
} else if (new_state === grpc.connectivityState.FATAL_FAILURE) {
diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js
index b0f3aa4b38..098905e74b 100644
--- a/src/node/test/surface_test.js
+++ b/src/node/test/surface_test.js
@@ -139,7 +139,7 @@ describe('Client#$waitForReady', function() {
var client;
before(function() {
server = new grpc.Server();
- port = server.bind('localhost:0');
+ port = server.bind('localhost:0', grpc.ServerCredentials.createInsecure());
server.start();
Client = surface_client.makeProtobufClientConstructor(mathService);
});
@@ -173,7 +173,6 @@ describe('Client#$waitForReady', function() {
assert.ifError(error);
done();
});
- client.$tryConnect();
});
it('should complete if called when already ready', function(done) {
client.$waitForReady(Infinity, function(error) {
@@ -183,7 +182,6 @@ describe('Client#$waitForReady', function() {
done();
});
});
- client.$tryConnect();
});
});
describe('Echo service', function() {